How to truncate characters in the layout of priority
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rami_Abramson
Posted On:   Monday, February 3, 2003 07:33 AM

			
Hello,

How is it possible in the property file to define a layout that outputs only
the first 3 characters of the priority?

Output lines for example,

DEB This is a test of DEBUG...
FAT This is a test of FATAL...

Instead of receiving,
DEBUG This is a test of DEBUG...
FATAL This is a test of FATAL...

if we use:
log4j.appender.dest1.layout.ConversionPattern=%-5p %m%n

thank you,

Rami A.

Re: How to truncate characters in the layout of priority

Posted By:   Anonymous  
Posted On:   Tuesday, February 4, 2003 08:44 AM

The only way I know is writing your own LayoutClass. With %.3p you should get BUG and TAL (not tested) because doc sais that´s the string is truncated "from the beginning" (which makes sense for Categories).

Re: How to truncate characters in the layout of priority

Posted By:   Anonymous  
Posted On:   Tuesday, February 4, 2003 08:41 AM

The only way I know is writing your own LayoutClass. With %.3p you should get BUG and TAL (not tested) because doc sais that´s the string is truncated "from the beginning" (which makes sense for Categories).

Re: How to truncate characters in the layout of priority

Posted By:   Anonymous  
Posted On:   Tuesday, February 4, 2003 08:40 AM

The only way I know is writing your own LayoutClass. With %.3p you should get BUG and TAL (not tested) because sais that´s the string is truncated "from the beginning" (which makes sense for Categories).

Re: How to truncate characters in the layout of priority

Posted By:   Anonymous  
Posted On:   Tuesday, February 4, 2003 08:40 AM

The only way I know is writing your own LayoutClass. With %.3p you should get BUG and TAL (not tested) because sais that´s the string is truncated "from the beginning" (which makes sense for Categories).
About | Sitemap | Contact