public class CommonsLogger extends java.lang.Object implements POILogger
POILogger
using the Apache Commons Logging framework. Which itself can be configured to send log to various different log frameworks and even allows to create a small wrapper for custom log frameworks.
(使用 Apache Commons Logging 框架的 POILogger 实现。它本身可以配置为将日志发送到各种不同的日志框架,甚至允许为自定义日志框架创建一个小型包装器。)
Constructor and Description |
---|
CommonsLogger() |
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 - 要记录的异常)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.