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 Max Rydahl Andersen <ma...@eos.dk> on 2002/02/20 14:25:27 UTC
Enhancment to %c conversionpattern ?
Hello log4j-user,
I know that with a category name "a.b.c" the pattern %c{2} will output
"b.c". (e.g. output the last 2 levels of the categories)
This is all great but is there a way to state that i want everything
below a certain category level ?
e.g. I got many categories and they all start with something similar
to:
com.vendor.application
so I got
com.vendor.application.X.Y.Z
com.vendor.application.X.Y
com.vendor.application.X.B.C
com.vendor.application.X.Y.G
in my logs - instead I would like it to contain:
X.Y.Z
X.Y
X.B.C
X.Y.G
Without changing the categories names!
Is that possible ? e.g. a %c{>3} meaning the rest of the category name
after 3 levels ?
One should ofcourse still see categories that has less than 3 levels,
but that is a implementation issue :)
--
Best regards,
Max
Medfork, Software Engineer
mailto:max@eos.dk
WHO'S AT JAOO? - http://www.jaoo.dk
-----------------------------------------------------------------------
Eastfork Object Space (EOS), Margrethepladsen 3, 8000 Ã…rhus C, Denmark
Tel: +45 8732 8787 / Fax: +45 8732 8788 / Mob: +45 4072 8483
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>