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

On Mon, Sep 22, 2014 at 11:24 AM, Ralph Goers <ralph.go...@dslextreme.com>
wrote:

> 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
>
>
> On Sep 22, 2014, at 8:05 AM, Gary Gregory <garydgreg...@gmail.com> wrote:
>
> On Mon, Sep 22, 2014 at 10:26 AM, Ralph Goers <ralph.go...@dslextreme.com>
>  wrote:
>
>> I 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
>
>
>> Please read the @doubts. I imagine most of them can be removed at this
>> point.
>>
>> Ralph
>>
>> On Sep 22, 2014, at 2:29 AM, Remko Popma <remko.po...@gmail.com> wrote:
>>
>> > I'm getting a compile error:
>> >
>> > Interpolator now has this line:
>> > +        lookups.put("java", new JavaLookup());
>> > But the JavaLookup class does not exist...
>> >
>> >
>> > Sent from my iPhone
>> >
>> >> On 2014/09/22, at 14:29, ggreg...@apache.org wrote:
>> >>
>> >> +        lookups.put("java", new JavaLookup());
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
>> > For additional commands, e-mail: log4j-dev-h...@logging.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-dev-h...@logging.apache.org
>>
>>
>
>
> --
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> <ggreg...@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
>
>
>


-- 
E-Mail: garydgreg...@gmail.com | ggreg...@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

Reply via email to