[ openjms-Patches-711932 ] Ability to detect Debug Logging attempt #2

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
Patches item #711932, was opened at 2003-03-29 20:32
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474138&aid=711932&group_id=54559

Category: None
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Martin Bosak (bosakm)
Assigned to: Nobody/Anonymous (nobody)
Summary: Ability to detect Debug Logging attempt #2

Initial Comment:
Hi,

I modified exolabcore LoggerIfc and Log4jLogger to add 
an 'isDebugEnabled()' method.  This allows a client 
class to detect if the Log4j Debug level is enabled prior 
to creating the message to be logged.  This could be a 
performance improvement if the debug message is being 
constructed by cascading String concatenation 
operations.

The CVS diffs are below:

=========================================
==========================
RCS 
file: /cvsroot/openjms/exolabcore/src/main/org/exolab/cor
e/logger/Log4jLogger.java,v
retrieving revision 1.5
diff -r1.5 Log4jLogger.java
125a126,130
>     
>     // implements LoggerIfc.isDebugEnabled
>     public boolean isDebugEnabled() {
>         return _category.isDebugEnabled();
>     }

=========================================
==========================
RCS 
file: /cvsroot/openjms/exolabcore/src/main/org/exolab/cor
e/logger/Log4jLogger.java,v
retrieving revision 1.5
diff -r1.5 Log4jLogger.java
125a126,130
>     
>     // implements LoggerIfc.isDebugEnabled
>     public boolean isDebugEnabled() {
>         return _category.isDebugEnabled();
>     }



----------------------------------------------------------------------

>Comment By: Tim Anderson (tanderson)
Date: 2003-03-31 13:33

Message:
Logged In: YES 
user_id=557161

Thanks for the suggestion, but we are intending to 
replace the Logger with commons-logging, which 
provides the same functionality.

This is likely to be done for the 0.7.6 release.

See http://sourceforge.net/tracker/index.php?
func=detail&aid=666995&group_id=54559&atid=47413
9 for more details.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474138&aid=711932&group_id=54559
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.