public final class Log4JLogger extends Object implements Log
Title: 常用代码打包
Description:
Implementation of Log that maps directly to a Log4J
Logger. Initial configuration of the corresponding
Logger instances should be done in the usual manner, as outlined in
the Log4J documentation.
Copyright: Copyright (c) 2006
Company: www.justdos.net
| 构造器和说明 |
|---|
Log4JLogger() |
Log4JLogger(org.slf4j.Logger logger)
For use with a log4j factory
|
Log4JLogger(String name)
Base constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
debug(Object message)
Log a message to the Log4j Logger with
DEBUG priority. |
void |
debug(Object message,
Throwable t)
Log an error to the Log4j Logger with
DEBUG priority. |
void |
error(Object message)
Log a message to the Log4j Logger with
ERROR priority. |
void |
error(Object message,
Throwable t)
Log an error to the Log4j Logger with
ERROR priority. |
void |
fatal(Object message)
Log a message to the Log4j Logger with
FATAL priority. |
void |
fatal(Object message,
Throwable t)
Log an error to the Log4j Logger with
FATAL priority. |
org.slf4j.Logger |
getLogger()
Return the native Logger instance we are using.
|
void |
info(Object message)
Log a message to the Log4j Logger with
INFO priority. |
void |
info(Object message,
Throwable t)
Log an error to the Log4j Logger with
INFO priority. |
boolean |
isDebugEnabled()
Check whether the Log4j Logger used is enabled for
DEBUG priority. |
boolean |
isErrorEnabled()
Check whether the Log4j Logger used is enabled for
ERROR priority. |
boolean |
isFatalEnabled()
Check whether the Log4j Logger used is enabled for
FATAL priority. |
boolean |
isInfoEnabled()
Check whether the Log4j Logger used is enabled for
INFO priority. |
boolean |
isTraceEnabled()
Check whether the Log4j Logger used is enabled for
TRACE priority. |
boolean |
isWarnEnabled()
Check whether the Log4j Logger used is enabled for
WARN priority. |
void |
trace(Object message)
Log a message to the Log4j Logger with
TRACE priority. |
void |
trace(Object message,
Throwable t)
Log an error to the Log4j Logger with
TRACE priority. |
void |
warn(Object message)
Log a message to the Log4j Logger with
WARN priority. |
void |
warn(Object message,
Throwable t)
Log an error to the Log4j Logger with
WARN priority. |
public Log4JLogger()
public Log4JLogger(String name)
public Log4JLogger(org.slf4j.Logger logger)
public void trace(Object message)
TRACE priority.
Currently logs to DEBUG level in Log4J.public void trace(Object message, Throwable t)
TRACE priority.
Currently logs to DEBUG level in Log4J.public void debug(Object message)
DEBUG priority.public void debug(Object message, Throwable t)
DEBUG priority.public void info(Object message)
INFO priority.public void info(Object message, Throwable t)
INFO priority.public void warn(Object message)
WARN priority.public void warn(Object message, Throwable t)
WARN priority.public void error(Object message)
ERROR priority.public void error(Object message, Throwable t)
ERROR priority.public void fatal(Object message)
FATAL priority.public void fatal(Object message, Throwable t)
FATAL priority.public org.slf4j.Logger getLogger()
public boolean isDebugEnabled()
DEBUG priority.isDebugEnabled 在接口中 Logpublic boolean isErrorEnabled()
ERROR priority.isErrorEnabled 在接口中 Logpublic boolean isFatalEnabled()
FATAL priority.isFatalEnabled 在接口中 Logpublic boolean isInfoEnabled()
INFO priority.isInfoEnabled 在接口中 Logpublic boolean isTraceEnabled()
TRACE priority.
For Log4J, this returns the value of isDebugEnabled()isTraceEnabled 在接口中 Logpublic boolean isWarnEnabled()
WARN priority.isWarnEnabled 在接口中 LogCopyright © 2023 onecode. All rights reserved.