You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Nipuni Piyabasi Perera <ni...@gmail.com> on 2016/02/01 14:06:38 UTC

Customizing log messages with log4j2

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

Thanks,
Nipuni

-- 
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