[slf4j-dev] Re: Beta 4 and the new method signatures
Ceki Gülcü
listid at qos.ch
Mon Jul 11 21:48:22 CEST 2005
At 06:37 PM 7/11/2005, Niclas Hedhman wrote:
>I like;
> * addChild to Logger, which can be extremely powerful in many IoC
> scenarios,
> and somethat difficult to emulate.
> * Loggers able to belong to more than one category hierarchy.
Niclas, you say that the addChild(String) method is somewhat difficult
to emulate. I don't see how that is so.
If manufacturing loggers is the responsibility of the container, then
by construction it make any logger its wants. Otherwise, if the IoC
container uses LoggerFactor.getLogger(String), then the IoC container
can surely say:
Logger parentLogger = LoggerFactory.getLogger(parentLoggerName);
Logger childLogger = LoggerFactory.getLogger(parentLoggerName+childSuffix);
Where is the rub?
In order to keep the SLF4J API as thin as possible, I would prefer to
avoid adding syntactic-sugar methods. If for whatever reason,
Logger.addChild() is really hard to emulate outside of the logging
system, then that is a different matter.
So, is Logger.addChild() really hard to emulate or is it "just" a
nice-to-have feature you'd like to see? Forgive my bluntness but I'd
like to get to the bottom of this.
>Cheers
>Niclas
--
Ceki Gülcü
The complete log4j manual: http://www.qos.ch/log4j/
More information about the slf4j-dev
mailing list