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 43867] NOPLoggerRepository error during shutdown
Date Wed, 09 Jul 2008 16:37:55 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=43867





--- Comment #36 from Dan Armbrust <daniel.armbrust.list@gmail.com>  2008-07-09 09:37:54
PST ---
> 2. When log4j notices that its static variables have been cleared, what should
> it print? The current stack trace would give no hint who cleared the variable
> because this probably has happened a long time ago, probably by some other
> thread. 

Actually, yes, this is exactly the stack trace I want.  I don't care what
thread cleared the variable - I already know that - its the main thread.  I
want to know whet thread is trying to use the now null variable.  It's not a
thread I started (in my known code), its none of the running threads the moment
before the error happens - so - its a newly spawned thread - most likely a
finalizer thread from some third party library I'm using.  I would like to
think that that stack trace would give me a good clue as to what the finalizer
is attempting to do - so maybe I could trace it back to where it was actually
registered.  At least it would tell me which library to look in.

> So you must find out: a) why is a logger called and b) who registered this
> piece of code which is executed after your webapp is supposed to be long gone?

That's what i've been trying to figure out the whole time.  But log4j is not
being helpful at all in tracking it down, since it won't give me any info on
the thread which is hitting the null variable and I have no clue which one of
the 50 jar files in my system is responsible for registering that code.  If
log4j is going to print an error message that is useless in actually tracking
down the error, why even bother?  99.9% of the developers won't care anyway,
since the system is shutting down.  So I think this message should either be
improved - or set back to info, or some such level, where it won't show up.  

>Just put a breakpoint in the place where log4j prints the error
> message and see who is trying to log.

Do you know where that is?  Because I don't, offhand.  

> 
> But it's a bug in your webapp (and I'm counting all the JARs you include as
> "your" here :) and not in log4j.
> 

I agree with that - but its a bug I don't care about.  Yet - log4j is insisting
that I should care about it.  But I don't.  Why isn't there a way for me to
tell log4j that I don't care about this problem - stop printing unnecessary
error messages like this?


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

---------------------------------------------------------------------
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