Hi,

Hi,

Is it possible for many loggers to use the same
appender ?

I know a single logger can log to multiple appender
but is the reverse true ?


I don't understand the question. Appenders don't declare loggers, loggers declare appenders and loggers can specify multiple appenders. What functionality are you looking for that you don't feel is already covered by this scenario?

I incurred in a similar doubt lately. Supose you are configuring your logger programmatically. So you can create an appender, create a logger, and set the appender to that logger. In the case you are creating more than one logger, it may be interesting (but I'm no sure yet...) to reuse the same appender, so that making changes in one configuration, will reflect on ALL the loggers that use it.

Ionel, is this your case?

Another question : when setting additivity to false,
what is the behavior when multiple appenders are
declared for the logger ?


Same as always. The only difference is that the logger with additivity="false" doesn't inherit appenders declared for parent loggers, but will log to any and all appenders declared for itself.

Jake

Thanks,
ionel


Jorge





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to