Package org.apache.poi.util
Class POILogger
- java.lang.Object
-
- org.apache.poi.util.POILogger
-
- Direct Known Subclasses:
CommonsLogger
,NullLogger
,SystemOutLogger
@Internal public abstract class POILogger extends Object
A logger interface that strives to make it as easy as possible for developers to write log calls, while simultaneously making those calls as cheap as possible by performing lazy evaluation of the log message.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
check(int 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.abstract void
initialize(String cat)
void
log(int level, Object... objs)
Log a message.
-
-
-
Field Detail
-
DEBUG
public static final int DEBUG
- See Also:
- Constant Field Values
-
INFO
public static final int INFO
- See Also:
- Constant Field Values
-
WARN
public static final int WARN
- See Also:
- Constant Field Values
-
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
-
FATAL
public static final int FATAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public abstract void initialize(String cat)
-
check
public abstract boolean check(int 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:if (logger.check(POILogger.INFO)) { logger.log(POILogger.INFO, "Avoid concatenating " + " strings and evaluating " + functions()); }
- Parameters:
level
- One of DEBUG, INFO, WARN, ERROR, FATAL
-
-