@Internal public class NullLogger extends java.lang.Object implements POILogger
POILogger
. This can be used to not log anything, however the suggested approach in production systems is to use the
CommonsLogger
and configure proper log-handling via Apache Commons Logging.
(POILogger 的空实现。这可用于不记录任何内容,但是在生产系统中建议的方法是使用 CommonsLogger 并通过 Apache Commons Logging 配置正确的日志处理。)
Constructor and Description |
---|
NullLogger() |
Modifier and Type | Method and Description |
---|---|
void |
_log(int level, java.lang.Object obj1)
Log a message
(记录消息)
|
void |
_log(int level, java.lang.Object obj1, java.lang.Throwable exception)
Log a message
(记录消息)
|
boolean |
check(int level)
Check if a logger is enabled to log at the specified level
(检查是否启用了记录器以在指定级别进行记录)
|
void |
initialize(java.lang.String cat)
Initialize the Logger - belongs to the SPI, called from the POILogFactory
(初始化 Logger - 属于 SPI,从 POILogFactory 调用)
|
void |
log(int level, java.lang.Object... objs)
Log a message.
(记录一条消息。)
|
public void initialize(java.lang.String cat)
POILogger
initialize
in interface
POILogger
(在接口 POILogger 中初始化)
cat
- the String that defines the log
(cat - 定义日志的字符串)
public void _log(int level, java.lang.Object obj1)
public void _log(int level, java.lang.Object obj1, java.lang.Throwable exception)
_log
in interface
POILogger
(_log 接口 POILogger)
level
- One of DEBUG, INFO, WARN, ERROR, FATAL
(level - DEBUG、INFO、WARN、ERROR、FATAL 之一)
obj1
- The object to log. This is converted to a string.
(obj1 - 要记录的对象。这将转换为字符串。)
exception
- An exception to be logged
(exception - 要记录的异常)
public void log(int level, java.lang.Object... objs)
Throwable
it is logged specially.
(记录一条消息。懒惰地将对象参数附加在一起。如果最后一个参数是 Throwable,则专门记录它。)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.