title: Log4j2 WebLookup not getting resolved
body: <p>I have the following log4j2 configuration </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Configuration status="TRACE"&gt;
      &lt;Appenders&gt;
          &lt;RollingRandomAccessFile name="SQLTiming" fileName="${web:rootDir}/log/SQLTiming.log"
              filePattern="${web:rootDir}/log/SQLTiming-%d{yyyy-MM-dd}.log"&gt;
              &lt;PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %logger{2} - %msg%n" /&gt;
              &lt;Policies&gt;
                  &lt;TimeBasedTriggeringPolicy /&gt;
              &lt;/Policies&gt;
          &lt;/RollingRandomAccessFile&gt;
          &lt;Console name="CONSOLE"&gt;
              &lt;PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %logger{2} - %msg%n" /&gt;
          &lt;/Console&gt;
      &lt;/Appenders&gt;
      &lt;Loggers&gt;
          &lt;Logger name="jdbc.sqltiming" level="info" additivity="false"&gt;
              &lt;AppenderRef ref="SQLTiming" /&gt;
          &lt;/Logger&gt;
          &lt;Root level="error"&gt;
              &lt;AppenderRef ref="CONSOLE" /&gt;
          &lt;/Root&gt;
      &lt;/Loggers&gt;
  &lt;/Configuration&gt;
  </code></pre>
  
  <p>When I try to get a logger via slf4j</p>
  
  <pre><code>    protected static Logger logger = LoggerFactory.getLogger(DbConn.class);
  </code></pre>
  
  <p>Log4j fails creating an appender. I've looked at the log4j2 source, and it tries to create the file <code>C:\Program Files\eclipse\${web:rootDir}\log\SQLTiming.log</code> (which it fails to do), so it seems that log4j didn't process the lookup.</p>
  
  <p>I am running the application in Tomcat 7.0.4, and using the syntax suggested by <a href="http://logging.apache.org/log4j/2.x/manual/lookups.html" rel="noreferrer">http://logging.apache.org/log4j/2.x/manual/lookups.html</a> .
  I have tried using $${web:rootDir} (with 2 $ marks) which resulted in one of the $-s being removed, but the lookup still didn't succeed. In fact, none of the other lookups succeeded (environment variables for example). Log4j version is 2.0 beta9.</p>
  
  <p>Has anybody else seen anything similar to this ? Am I missing something ?</p>