mirror of https://github.com/apache/poi.git
bug 59933: demote accessibility of NullLogger methods to the same level as POILogger
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1761662 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f7dfffd0c6
commit
c7cf4cbeb0
|
@ -23,6 +23,7 @@ package org.apache.poi.util;
|
||||||
* calls as cheap as possible by performing lazy evaluation of the log
|
* calls as cheap as possible by performing lazy evaluation of the log
|
||||||
* message.<p>
|
* message.<p>
|
||||||
*/
|
*/
|
||||||
|
@Internal
|
||||||
public class NullLogger extends POILogger {
|
public class NullLogger extends POILogger {
|
||||||
@Override
|
@Override
|
||||||
public void initialize(final String cat) {
|
public void initialize(final String cat) {
|
||||||
|
@ -37,7 +38,7 @@ public class NullLogger extends POILogger {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void log(final int level, final Object obj1) {
|
protected void log(final int level, final Object obj1) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ public class NullLogger extends POILogger {
|
||||||
* @param exception An exception to be logged
|
* @param exception An exception to be logged
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void log(int level, Object obj1, final Throwable exception) {
|
protected void log(int level, Object obj1, final Throwable exception) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,15 @@ public abstract class POILogger {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a logger is enabled to log at the specified level
|
* 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
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue