title: not able to put the values in the MDC
body: <p>I am trying to log few values in the <code>onBeginRequest()</code> of <code>RequestCycle()</code> in wicket. 
  But the values are not being logged in the debug file. I am putting the values in the MDC in <code>RequestCycleListeners()</code>. </p>
  
  <p>Following is the code:</p>
  
  <pre><code>getRequestCycleListeners().add(new AbstractRequestCycleListener()
  {       
  public void onBeginRequest(RequestCycle cycle) 
  {                   
    if( cycle.getRequest().getContainerRequest() instanceof HttpServletRequest )
    {
      HttpServletRequest containerRequest = 
          (HttpServletRequest)cycle.getRequest().getContainerRequest();
  
      MDC.put("serverName", containerRequest.getServerName());
      MDC.put("sessionId",  containerRequest.getSession().getId());
  
      LOGGER.debug("logging from RequestCycleListeners() !!!");
      WebClientInfo webClientInfo = new WebClientInfo(RequestCycle.get());
      System.out.println(webClientInfo.getUserAgent());
      System.out.println("webClientInfo.getProperties().getBrowserVersionMajor() " +containerRequest.getRemoteAddr());
  }
  </code></pre>
  
  <p>};</p>
  
  <p>I am expecting 'serverName', 'sessionId' to be logged in the debug file. </p>
  
  <p>I have added this <code>listener</code> in the class which is extending the <code>WebApplication</code>. </p>
  
  <p>I am using log4j.xml the <code>DEBUG appender</code> is looks as below:</p>
  
  <pre><code>&lt;appender name="DEBUG" class="org.apache.log4j.rolling.RollingFileAppender"&gt;
    &lt;param name="Append" value="true"/&gt;
    &lt;layout class="org.apache.log4j.PatternLayout"&gt;
      &lt;param name="ConversionPattern" value="[%d{ISO8601} %t %5p] %m -- %X{serverName} -- %X{sessionId} -- %X{portNumber}%n"/&gt;
    &lt;/layout&gt;
    &lt;filter class="org.apache.log4j.varia.LevelRangeFilter"&gt;
      &lt;param name="LevelMin" value="DEBUG"/&gt;
      &lt;param name="LevelMax" value="WARN"/&gt;
    &lt;/filter&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p>and we are defining scope in root tag :</p>
  
  <pre><code>&lt;root&gt;
     &lt;priority value="INFO" /&gt;
     &lt;appender-ref ref="CONSOLE" /&gt;
     &lt;appender-ref ref="DEBUG" /&gt;
     &lt;appender-ref ref="ERROR" /&gt;
  &lt;/root&gt;
  </code></pre>