You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Robert Heinicke <rh...@itcampus.de> on 2007/07/02 11:28:55 UTC

Negative precision modifier for pattern layout

Hello list!

The 1.2 SDK reference states that the logger and type conversation
patterns of the pattern layout accept a precision modifier.

Is it possible to specify a precision that will _remove_ the n left most
components? E.g. if logger is "foo.bar.baz" "%logger{-1}" would result
in "bar.baz".

We typically use one appender per module namespace so that everything
from the "company.product.module.*" namespace gets logged into
"product_module.log". Therefore we only need the rest of the namespace
(which can be arbitrarily deep) in the logfile itself.

TIA,
Robert