Doug Berkland created LOG4J2-1633:
-------------------------------------
Summary: Using "${log4j:configLocation}" a header on Windows OS
does not render properly
Key: LOG4J2-1633
URL: https://issues.apache.org/jira/browse/LOG4J2-1633
Project: Log4j 2
Issue Type: Bug
Components: Layouts
Affects Versions: 2.6.2
Environment: JDK 1.8.0_101
Windows 7
Reporter: Doug Berkland
Using the "${log4j:configLocation}" lookup in a header on Windows OS does not
render properly. It likes like it is being run through a Java unescape routine
when it should not be.
Steps to reproduce
* Run on Windows
* Use the following log4j2.xml
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="CONSOLE" target="SYSTEM_OUT">
<PatternLayout pattern="%-5p %m -- %l %d%n" header="loading
${log4j:configLocation}%n" />
</Console>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="CONSOLE" />
</Root>
</Loggers>
</Configuration>
{code}
Expected results:
The header will be something like:
{quote}
loading D:\dev\code\trunk\config\config\log4j2.xml
{quote}
Actual results:
The header is something like:
{quote}
loading D:devcode<TAB>runkconfigconfiglog4j2.xml
{quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]