Don't believe there is a mechanism to configure that, but it would be achievable by providing a custom layout class and possibly, by providing a custom PatternConverter for PatternLayout.

The %p pattern could be extended to process a trailing parameter to provide mappings of level values something like:

%p{10000=DIAGNOSTIC, 20000=INFOR, 30000=BAD}

or

%p{10000, 20000, 30000}{DIAGNOSTIC, INFOR, BAD}

If you'd like to pursue that course, I would start a discussion on log4j-dev since I like log4j to take the lead in considering new features.

On Sep 22, 2006, at 3:58 AM, CARLOS GUTIERREZ GARCIA wrote:

Hi all,


I’d like to know if it is possible to change the printed label associated to each log level in the output messages.

For instance, I want the literal ‘INFOR’ to be printed instead of ‘INFO’ when a message with log level INFO (Logger.info()) is sent.


Regards.



Reply via email to