Great!  Thanks.

Scott



On Mar 27, 2010, at 7:03 PM, Curt Arnold <[email protected]> wrote:


On Mar 27, 2010, at 7:41 PM, Scott Deboy wrote:

I'd like to define a conversion pattern that would take:

org.apache.log4j.package1.package2.package3.classname

and output

package1.package2.package3.classname

Using some pattern like %p{3}

Basically stripping off the leading 3 package names..

I see that the NameAbbreviator class is the right place to add this capability, but was hoping someone (Curt?) could give me a quick pointer on how to go about it (or is this already possible with an already-existing NameAbbreviator implementation?)

Scott

%c{3} is used to output the last three elements of a name. I've enhanced NameAbbreviator to recognize %c{-3} to drop three elements off the name on bug 49010. The Javadoc for EnhancedPatternLayout did not hint at the other capabilities of NameAbbreviator and still had PatternLayout's @since tag, so I updated those at the same time.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to