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


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From [EMAIL PROTECTED]  2005-12-03 19:51 -------
I haven't looked at the BasicConfigurator code yet, but it seems to me that this
is an additivity issue.  My hunch is that BasicConfigurator adds a
ConsoleAppender to the ROOT logger at the DEBUG level.  Each time
BasicConfigurator is called in the same logger repository, a new ConsoleAppender
is added.  Means that the first call will produce one line of output because
there's only one ConsoleAppender attached.  Successive calls will produce one
more line of output than the previous because there will be one more
ConsoleAppender attached than the previous run.  Log4j does not blow away
previous configurations.  It's all additive.

Log4j is working properly.  The question is, why are you calling
BasicConfigurator?  Why not just put log4j.properties or log4j.xml in the
default package and in the classapath and let Log4j configure itself once?  If
you do want to configure it yourself, you should do it in a way where it will
only happen once, such as in a static block or at the beginning of the Main
method you use to kick off the whole process.  Log4j is just doing what you tell
it to do here.

Marking invalid, as the behavior is correct, even if it might be unexpected to 
some.

Jake

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to