[dna-commits] DNA SVN: r596 - trunk/dna-common/src/main/java/org/jboss/dna/common/util.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Wed Oct 29 11:16:23 EDT 2008


Author: rhauch
Date: 2008-10-29 11:16:23 -0400 (Wed, 29 Oct 2008)
New Revision: 596

Modified:
   trunk/dna-common/src/main/java/org/jboss/dna/common/util/Logger.java
Log:
Removed (unused) methods to determine if error, info, or warning messages are enabled.  The code using the logger should never be concerned with this, as it should just log the messages at the appropriate level.

There still are methods to determine if debug and trace messages are enabled.  However, since these methods are intended for developers (note that they do not take I18n but take strings) and because such methods may require doing more work to prepare the messages (e.g., processing and accumulating information that you'd normally not do), it is still useful to know whether debug or trace is enabled.

Modified: trunk/dna-common/src/main/java/org/jboss/dna/common/util/Logger.java
===================================================================
--- trunk/dna-common/src/main/java/org/jboss/dna/common/util/Logger.java	2008-10-28 23:47:02 UTC (rev 595)
+++ trunk/dna-common/src/main/java/org/jboss/dna/common/util/Logger.java	2008-10-29 15:16:23 UTC (rev 596)
@@ -369,7 +369,7 @@
      * 
      * @return true if INFORMATION log messages are currently being logged, or false otherwise.
      */
-    public boolean isInfoEnabled() {
+    protected boolean isInfoEnabled() {
         return this.delegate.isInfoEnabled();
     }
 
@@ -378,7 +378,7 @@
      * 
      * @return true if WARNING log messages are currently being logged, or false otherwise.
      */
-    public boolean isWarnEnabled() {
+    protected boolean isWarnEnabled() {
         return this.delegate.isWarnEnabled();
     }
 
@@ -387,7 +387,7 @@
      * 
      * @return true if ERROR log messages are currently being logged, or false otherwise.
      */
-    public boolean isErrorEnabled() {
+    protected boolean isErrorEnabled() {
         return this.delegate.isErrorEnabled();
     }
 




More information about the dna-commits mailing list