Customizing Log4j to filter PatternLayout

Posted by JavaScriptDude on Stack Overflow See other posts from Stack Overflow or by JavaScriptDude
Published on 2010-03-05T03:37:38Z Indexed on 2010/05/25 0:01 UTC
Read the original article Hit count: 225

Filed under:
|

Greetings,

I have just starting migrating to WLS 10.x and have noticed that the thread name [%t] for WL is quite verbose and more informative than I need for my deployment needs.

Ultimately, I only care about the thread ID but WL gives me this:
   [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'
~

Does anybody know if there is a way in log4j to write a custom filter that will allow me to override PatternLayout so I can parse the WLS Thread Name to just output the thread ID which in this case above is 0. I'd rather extend then customize as it makes upgrading libraries so much easier.

Thanks :) - JsD

© Stack Overflow or respective owner

Related posts about log4j

Related posts about customization