[ 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 14:32
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474138&aid=711932&group_id=54559
Category: None
Group: None
Status: Open
Resolution: None
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();
> }
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474138&aid=711932&group_id=54559