logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Arnold <arn...@moonhill.org>
Subject RFE: PatternLayout to strip initial components of category/comment
Date Fri, 02 Aug 2002 19:47:07 GMT
I can't find this suggestion in the archives, but maybe I'm just dense 
(these are possibly unrelated statements.-)

PatternLayout allows a format of the form %c{2} to show only the last 
two components of the category name.  Usually for me, it is the initial 
number of components to delete that I know: if I'm logging stuff for 
com.acme, removing "com.acme" I can fairly easily recognize subpackages, 
as in "util" being a short-hand for com.acme.util.  But I don't know in 
advance how deep the subpackage nesting goes: %c{1} would work here, but 
then fail for "com.acme.analysis.util".

So I would like to see something that lets me strip off a certain number 
of initial components.  For example, %c{-2} to strip off the initial two 
components.  Or be able to strip off particular class components, as in 
%c{-com.acme,-java.lang} to strip off com.acme and java.lang from 
components, but leave other category names alone.

(Of course all this goes for %C as well.)

		Ken Arnold

To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

View raw message