You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Ken Arnold <ar...@moonhill.org> on 2002/08/02 21:47:07 UTC
RFE: PatternLayout to strip initial components of category/comment
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: PatternLayout to strip initial components of category/comment
Posted by peter riegersperger <ri...@subnet.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> -----Original Message-----
> From: Ken Arnold [mailto:arnold@moonhill.org]
[...]
> 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.
i second that request. such a feature would be very, very welcome!
rick
|-
| peter riegersperger <ri...@subnet.at>
|-
| subnet
| platform for media art and experimental technologies
|-
| http://www.subnet.at/
|-
| muehlbacherhofweg 5 // 5020 salzburg // austria
|-
| fon/fax +43/662/842 897
|-
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
Comment: public key available at http://home.subnet.at/rick/pgp/
iQA/AwUBPUuoYCDD9/SWDsvSEQJDJwCeKxW33IFrwucDYc4f1+odL18bynwAoPeC
5xmk7JyrooQmajo6i6E1BIRI
=o1We
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>