Author: onealj
Date: Wed Sep 21 02:12:54 2016
New Revision: 1761662

URL: http://svn.apache.org/viewvc?rev=1761662&view=rev
Log:
bug 59933: demote accessibility of NullLogger methods to the same level as 
POILogger

Modified:
    poi/trunk/src/java/org/apache/poi/util/NullLogger.java
    poi/trunk/src/java/org/apache/poi/util/POILogger.java

Modified: poi/trunk/src/java/org/apache/poi/util/NullLogger.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/NullLogger.java?rev=1761662&r1=1761661&r2=1761662&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/NullLogger.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/NullLogger.java Wed Sep 21 02:12:54 
2016
@@ -23,6 +23,7 @@ package org.apache.poi.util;
  * calls as cheap as possible by performing lazy evaluation of the log
  * message.<p>
  */
+@Internal
 public class NullLogger extends POILogger {
     @Override
     public void initialize(final String cat) {
@@ -37,7 +38,7 @@ public class NullLogger extends POILogge
      */
 
     @Override
-    public void log(final int level, final Object obj1) {
+    protected void log(final int level, final Object obj1) {
         // do nothing
     }
 
@@ -49,7 +50,7 @@ public class NullLogger extends POILogge
      * @param exception An exception to be logged
      */
     @Override
-    public void log(int level, Object obj1, final Throwable exception) {
+    protected void log(int level, Object obj1, final Throwable exception) {
         // do nothing
     }
 

Modified: poi/trunk/src/java/org/apache/poi/util/POILogger.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/POILogger.java?rev=1761662&r1=1761661&r2=1761662&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/POILogger.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/POILogger.java Wed Sep 21 02:12:54 
2016
@@ -68,6 +68,15 @@ public abstract class POILogger {
 
     /**
      * Check if a logger is enabled to log at the specified level
+     * This allows code to avoid building strings or evaluating functions in
+     * the arguments to log.
+     * 
+     * An example:
+     * <code><pre>
+     * if (logger.check(POILogger.INFO)) {
+     *     logger.log(POILogger.INFO, "Avoid concatenating " + " strings and 
evaluating " + functions());
+     * }
+     * </pre></code>
      *
      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
      */



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org

Reply via email to