I mean that I cannot get values for "%n" and "%d{UNIX}" in a header or
footer.
I was trying to use %n and it did not work so I tried %d{UNIX} just to see
what would happen and it did not work either.
Looking at the code, this is not surprising since the enhancement
implemented in LOG4J-496 only covered look-ups.
For my narrow case, the workaround is the more verbose
${sys:line.separator}, which is a system property look-up.
I created https://issues.apache.org/jira/browse/LOG4J2-847
Gary
What do you mean â%âs do notâ? You mean PatternConverters? I think
someone asked for that enhancement, but since the header and footer are
processed before a LogEvent exists their are a whole pile of them that
wonât work.
Ralph
Post by Ralph GoersI thought Gary recently implemented that.
I had talked about it, and worked it out over the weekend, it's not much
code actually (as expected).
What was unexpected is that while lookups work in header and footers, %'s
do not, so you cannot use formatted dates, end-of-lines and such.
Gary
Post by Ralph GoersRalph
Post by Remko Popma+ lookups.put("java", new JavaLookup());
But the JavaLookup class does not exist...
Sent from my iPhone
Post by Remko Popma+ lookups.put("java", new JavaLookup());
---------------------------------------------------------------------
---------------------------------------------------------------------
--
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
--
E-Mail: ***@gmail.com | ***@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory