At 06:06 PM 4/12/2006, Scott Deboy wrote:
The goal should be to ensure getLogger() doesn't cause a fault (check for null and use a default logger name such as 'unresolved.logger'), and that the javadoc for this method would clearly explain that this method may return the 'default' logger name or an unexpected name because of the stack trace parsing.

Assuming the stack trace information is not degenerate, you can never be sure that the parsed information is correct. It follows that some loggers returned by Logger.getLogger(--noarg--) can be wrong. Some will have the correct names while others may not. Moreover, you won't be able to tell them apart.

The rationale for providing this method (once it's robust in the face of the odd stack trace) seems very similar to why we support LocationInfo=true on appenders or provide line/file, etc conversion patterns in PatternLayout.

Any uncertainty in incorrect logger names seems to me more serious than uncertainty in incorrect location information.

Scott Deboy

--
Ceki Gülcü


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

Reply via email to