public class SystemOutLogger extends java.lang.Object implements POILogger
POILogger
which uses System.out.println. This can be used to provide simply output from applications, however the suggested approach in production systems is to use the
CommonsLogger
and configure proper log-handling via Apache Commons Logging.
(使用 System.out.println 的 POILogger 的实现。这可用于提供应用程序的简单输出,但在生产系统中建议的方法是使用 CommonsLogger 并通过 Apache Commons Logging 配置适当的日志处理。)
Constructor and Description |
---|
SystemOutLogger() |
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 调用)
|
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 boolean check(int level)
check
in interface
POILogger
(签入界面POILogger)
level
- One of DEBUG, INFO, WARN, ERROR, FATAL
(level - DEBUG、INFO、WARN、ERROR、FATAL 之一)
POILogger.DEBUG
,
POILogger.INFO
,
POILogger.WARN
,
POILogger.ERROR
,
POILogger.FATAL
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.