logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37768] - BasicConfigurator - duplicated output
Date Thu, 13 Jul 2006 20:25:05 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37768>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37768





------- Additional Comments From carnold@apache.org  2006-07-13 20:25 -------
At this point in the life of log4j 1.2, I don't see changing an established behavior.  It
may not be as 
smart as you would like, but any change would require careful consideration of what the "smarter"

behavior should be.

For example, if you did:

BasicConfigurator.configure();
((ConsoleAppender) LogManager.getRootLogger().getAllAppenders().nextElement()).setLayout(new

PatternLayout("..."));
BasicConfigurator.configure();

Should the second invocation leave the modified console appender from the first invocation
or should it 
replace it with the new appender?

How about if another appender had been added programatically.  Should a second invocation
of 
BasicConfigurator.configure remove all appenders others than the ones that it expects to be
there?

At this point in the life of log4j 1.2, those questions have been settled since any change
could break 
applications that depend on the established behavior of configurators ignoring any previous

configuration.  The caller is responsible for not calling the configurator multiple times
if they do not 
want multiple appenders.

The usability issue could be reviewed as part of the log4j 2.0 development, but I'd expect
the 
configurators to be significantly different in log4j 2.0.  Likely BasicConfigurator would
not exist in 
native log4j 2.0, but would only exist in a compatibility layer and that would want to mimic
the 
established behavior.

If there is no additional discussion, I will eventually mark this one as INVALID again.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message