logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nipuni Piyabasi Perera <nipuni880...@gmail.com>
Subject Customizing log messages with log4j2
Date Mon, 01 Feb 2016 13:06:38 GMT
Hi all,

I am working on adding some new log parameters to my log messages. I could
read that log4j2 provide the option to add new Converters without extending
PatternLayout. I have tried out a sample custom PatternConverter in my OSGi
environment. I got the error below, which is already reported in [1].
I haven't tried extending the patternLayout yet to address my requirement.
What is the recommended way with log4j2 to customize logging information?
Can we continue extending the patternLayout with log4j2 too?

2016-02-01 18:08:20,794 ERROR Unrecognized format specifier [hostname]
2016-02-01 18:08:20,794 ERROR Unrecognized conversion specifier [hostname]
starting at position 28 in conversion pattern.

[1] https://issues.apache.org/jira/browse/LOG4J2-954


Nipuni Perera
Software Engineer; WSO2 Inc.; http://wso2.com
Email: nipuni@wso2.com
Git hub profile: https://github.com/nipuni
Blog : http://nipunipererablog.blogspot.com/
Mobile: +94 (71) 5626680

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message