logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Deboy <scott.de...@gmail.com>
Subject Re: NameAbbreviator
Date Sun, 28 Mar 2010 02:22:51 GMT
Great!  Thanks.

Scott



On Mar 27, 2010, at 7:03 PM, Curt Arnold <carnold@apache.org> 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: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message