When you configure the root logger to use an Appender, all other named
loggers that you create share that Appender instance. The system does
not create a new Appender for each child logger.
This makes it impossible to create an Appender that maintains state for
a given child logger. (And it's no mystery now why log4j has
synchronization problems.)
Let's say you want to log to a file, with a different file for each
logger, and have the filename depend on the logger name. It's impossible
to do unless you configure, in advance, every possible logger name with
its own Appender. If you use any libraries that create their own loggers
without telling you, you're out of luck.
Somebody please tell me there's a switch somewhere that will tell the
default logger factory to create a new Appender instance for each child
logger.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]