Modifier and Type | Field and Description |
---|---|
protected org.slf4j.spi.MDCAdapter |
mdc |
Constructor and Description |
---|
LoggerImpl(org.slf4j.Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
debug(Locale locale,
String code,
Context context)
通过国际化方式进行记录
|
void |
debug(Locale locale,
String code,
Object... args)
通过国际化方式进行记录
|
void |
debug(Locale locale,
String code,
Throwable t,
Context context) |
void |
debug(Locale locale,
String code,
Throwable t,
Object... args) |
void |
debug(String code,
Context context)
通过国际化方式进行记录
|
void |
debug(String code,
Object... args)
通过国际化方式进行记录
|
void |
debug(String code,
Throwable t,
Context context) |
void |
debug(String code,
Throwable t,
Object... args) |
void |
debugMessage(String message,
Context context) |
void |
debugMessage(String message,
Object... args)
不对message进行格式化直接输出
|
void |
debugMessage(String message,
Throwable t,
Context context) |
void |
debugMessage(String message,
Throwable t,
Object... args) |
void |
endTransaction()
结束事务日志
|
void |
error(Locale locale,
String code,
Context context) |
void |
error(Locale locale,
String code,
Object... args) |
void |
error(Locale locale,
String code,
Throwable throwable,
Context context) |
void |
error(Locale locale,
String code,
Throwable throwable,
Object... args) |
void |
error(String code) |
void |
error(String code,
Context context) |
void |
error(String code,
Object... args) |
void |
error(String code,
Throwable throwable) |
void |
error(String code,
Throwable throwable,
Context context) |
void |
error(String code,
Throwable throwable,
Object... args) |
void |
error(Throwable throwable) |
void |
errorMessage(String message,
Context context) |
void |
errorMessage(String message,
Object... args) |
void |
errorMessage(String message,
Throwable throwable,
Context context) |
void |
errorMessage(String message,
Throwable throwable,
Object... args) |
void |
flushTransaction()
把事务日志缓冲中的内容写入到日志当中,慎用
由哪个日志记录器发起,则会用哪个日志记录器记录 |
LogBuffer |
getLogBuffer()
获取日志缓冲
|
org.slf4j.Logger |
getLogger()
返回原生的日志记录器,,慎用
采用此日志记录器,则缓冲,国际化等都无法使用 |
int |
getMaxBufferRecords()
返回缓存限制记录条数
说明:该参数在日志对象被置为缓存模式后才有效, 若缓存待输出日志条数超过该参数,插件将调用 flush方法输出日志并清空缓存。 |
void |
info(Locale locale,
String code,
Context context)
通过国际化方式进行记录
|
void |
info(Locale locale,
String code,
Object... args)
通过国际化方式进行记录
|
void |
info(Locale locale,
String code,
Throwable t,
Context context) |
void |
info(Locale locale,
String code,
Throwable t,
Object... args) |
void |
info(String code,
Context context)
通过国际化方式进行记录
|
void |
info(String code,
Object... args)
通过国际化方式进行记录
|
void |
info(String code,
Throwable t,
Context context) |
void |
info(String code,
Throwable t,
Object... args) |
void |
infoMessage(String message,
Context context) |
void |
infoMessage(String message,
Object... args)
不对message进行格式化直接输出
|
void |
infoMessage(String message,
Throwable t,
Context context) |
void |
infoMessage(String message,
Throwable t,
Object... args) |
boolean |
isEnabled(LogLevel logLevel)
判定某个级别是否启用
|
boolean |
isSupportTransaction()
是否支持事务日志
|
void |
log(LogLevel logLevel,
Locale locale,
String code,
Context context)
通过国际化方式进行记录
|
void |
log(LogLevel logLevel,
Locale locale,
String code,
Object... args)
通过国际化方式进行记录
|
void |
log(LogLevel logLevel,
Locale locale,
String code,
Throwable t,
Context context) |
void |
log(LogLevel logLevel,
Locale locale,
String code,
Throwable t,
Object... args) |
void |
log(LogLevel logLevel,
String code) |
void |
log(LogLevel logLevel,
String code,
Context context)
通过国际化方式进行记录
|
void |
log(LogLevel logLevel,
String code,
Object... args)
通过国际化方式进行记录
|
void |
log(LogLevel logLevel,
String code,
Throwable t,
Context context) |
void |
log(LogLevel logLevel,
String code,
Throwable t,
Object... args) |
void |
logMessage(LogLevel logLevel,
String message) |
void |
logMessage(LogLevel logLevel,
String message,
Context context)
不对message进行格式化直接输出
|
void |
logMessage(LogLevel logLevel,
String message,
Object... args)
不对message进行格式化直接输出
|
void |
logMessage(LogLevel logLevel,
String message,
Throwable t) |
void |
logMessage(LogLevel logLevel,
String message,
Throwable t,
Context context) |
void |
logMessage(LogLevel logLevel,
String message,
Throwable t,
Object... args) |
void |
putToMDC(String key,
Object value)
往MDC存放值
|
void |
removeFromMDC(String key)
移除MDC中变量值
|
void |
removeLogBuffer()
删除日志缓冲
|
void |
resetTransaction()
重置事务日志,记数器归零,内容清空,一般在最上层调用,否则会导致缓冲内容丢失,慎用
|
void |
setMaxBufferRecords(int maxBufferRecords)
设置缓存限制记录条数
说明:当日志对象被置为缓存模式后,该参数用于 限制缓存允许的最大记录条数。 |
void |
setSupportTransaction(boolean supportBusiness)
设置事务日志支持方式
|
void |
startTransaction()
开始事务日志
|
void |
trace(Locale locale,
String code,
Context context)
通过国际化方式进行记录
|
void |
trace(Locale locale,
String code,
Object... args)
通过国际化方式进行记录
|
void |
trace(Locale locale,
String code,
Throwable t,
Context context) |
void |
trace(Locale locale,
String code,
Throwable t,
Object... args) |
void |
trace(String code,
Context context)
通过国际化方式进行记录
|
void |
trace(String code,
Object... args)
通过国际化方式进行记录
|
void |
trace(String code,
Throwable t,
Context context) |
void |
trace(String code,
Throwable t,
Object... args) |
void |
traceMessage(String message,
Context context) |
void |
traceMessage(String message,
Object... args)
不对message进行格式化直接输出
|
void |
traceMessage(String message,
Throwable t,
Context context) |
void |
traceMessage(String message,
Throwable t,
Object... args) |
void |
warn(Locale locale,
String code,
Context context)
通过国际化方式进行记录
|
void |
warn(Locale locale,
String code,
Object... args)
通过国际化方式进行记录
|
void |
warn(Locale locale,
String code,
Throwable t,
Context context) |
void |
warn(Locale locale,
String code,
Throwable t,
Object... args) |
void |
warn(String code,
Context context)
通过国际化方式进行记录
|
void |
warn(String code,
Object... args)
通过国际化方式进行记录
|
void |
warn(String code,
Throwable t,
Context context) |
void |
warn(String code,
Throwable t,
Object... args) |
void |
warnMessage(String message,
Context context) |
void |
warnMessage(String message,
Object... args)
不对message进行格式化直接输出
|
void |
warnMessage(String message,
Throwable t,
Context context) |
void |
warnMessage(String message,
Throwable t,
Object... args) |
public boolean isSupportTransaction()
Logger
isSupportTransaction
in interface Logger
public void setSupportTransaction(boolean supportBusiness)
Logger
setSupportTransaction
in interface Logger
supportBusiness
- true为支持,false为不支持,默认为支持public void removeLogBuffer()
Logger
removeLogBuffer
in interface Logger
public LogBuffer getLogBuffer()
Logger
getLogBuffer
in interface Logger
public void startTransaction()
Logger
startTransaction
in interface Logger
public void endTransaction()
Logger
endTransaction
in interface Logger
public void flushTransaction()
Logger
flushTransaction
in interface Logger
public void resetTransaction()
Logger
resetTransaction
in interface Logger
public org.slf4j.Logger getLogger()
Logger
public boolean isEnabled(LogLevel logLevel)
Logger
public void logMessage(LogLevel logLevel, String message)
logMessage
in interface Logger
public void logMessage(LogLevel logLevel, String message, Throwable t)
logMessage
in interface Logger
public void log(LogLevel logLevel, Locale locale, String code, Object... args)
Logger
public void log(LogLevel logLevel, String code, Object... args)
Logger
public void log(LogLevel logLevel, Locale locale, String code, Context context)
Logger
public void log(LogLevel logLevel, String code, Context context)
Logger
public void logMessage(LogLevel logLevel, String message, Object... args)
Logger
logMessage
in interface Logger
message
- 采用{0} {1} 方式占位public void logMessage(LogLevel logLevel, String message, Throwable t, Object... args)
logMessage
in interface Logger
public void logMessage(LogLevel logLevel, String message, Context context)
Logger
logMessage
in interface Logger
message
- 采用{name} {$age} 方式占位public void logMessage(LogLevel logLevel, String message, Throwable t, Context context)
logMessage
in interface Logger
public void errorMessage(String message, Object... args)
errorMessage
in interface Logger
public void errorMessage(String message, Throwable throwable, Object... args)
errorMessage
in interface Logger
public void errorMessage(String message, Throwable throwable, Context context)
errorMessage
in interface Logger
public void putToMDC(String key, Object value)
Logger
public void removeFromMDC(String key)
Logger
removeFromMDC
in interface Logger
public int getMaxBufferRecords()
Logger
getMaxBufferRecords
in interface Logger
public void setMaxBufferRecords(int maxBufferRecords)
Logger
setMaxBufferRecords
in interface Logger
maxBufferRecords
- 设置限制记录数public void infoMessage(String message, Object... args)
Logger
infoMessage
in interface Logger
message
- 采用{0} {1} 方式占位public void infoMessage(String message, Throwable t, Object... args)
infoMessage
in interface Logger
public void infoMessage(String message, Context context)
infoMessage
in interface Logger
public void infoMessage(String message, Throwable t, Context context)
infoMessage
in interface Logger
public void debugMessage(String message, Object... args)
Logger
debugMessage
in interface Logger
message
- 采用{0} {1} 方式占位public void debugMessage(String message, Throwable t, Object... args)
debugMessage
in interface Logger
public void debugMessage(String message, Context context)
debugMessage
in interface Logger
public void debugMessage(String message, Throwable t, Context context)
debugMessage
in interface Logger
public void warnMessage(String message, Object... args)
Logger
warnMessage
in interface Logger
message
- 采用{0} {1} 方式占位public void warnMessage(String message, Throwable t, Object... args)
warnMessage
in interface Logger
public void warnMessage(String message, Context context)
warnMessage
in interface Logger
public void warnMessage(String message, Throwable t, Context context)
warnMessage
in interface Logger
public void traceMessage(String message, Object... args)
Logger
traceMessage
in interface Logger
message
- 采用{0} {1} 方式占位public void traceMessage(String message, Throwable t, Object... args)
traceMessage
in interface Logger
public void traceMessage(String message, Context context)
traceMessage
in interface Logger
public void traceMessage(String message, Throwable t, Context context)
traceMessage
in interface Logger
public void info(Locale locale, String code, Object... args)
Logger
public void info(String code, Object... args)
Logger
public void info(Locale locale, String code, Context context)
Logger
public void info(String code, Context context)
Logger
public void debug(Locale locale, String code, Object... args)
Logger
public void debug(String code, Object... args)
Logger
public void debug(Locale locale, String code, Context context)
Logger
public void debug(String code, Context context)
Logger
public void warn(Locale locale, String code, Object... args)
Logger
public void warn(String code, Object... args)
Logger
public void warn(Locale locale, String code, Context context)
Logger
public void warn(String code, Context context)
Logger
public void trace(Locale locale, String code, Object... args)
Logger
public void trace(String code, Object... args)
Logger
public void trace(Locale locale, String code, Context context)
Logger
public void trace(String code, Context context)
Logger
public void errorMessage(String message, Context context)
errorMessage
in interface Logger
Copyright © 2006–2018 TinyGroup. All rights reserved.