public interface 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 bufferRecords)
设置缓存限制记录条数
说明:当日志对象被置为缓存模式后,该参数用于 限制缓存允许的最大记录条数。 |
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) |
boolean isSupportTransaction()
void setSupportTransaction(boolean supportBusiness)
supportBusiness
- true为支持,false为不支持,默认为支持LogBuffer getLogBuffer()
void removeLogBuffer()
void startTransaction()
void endTransaction()
void flushTransaction()
void resetTransaction()
org.slf4j.Logger getLogger()
boolean isEnabled(LogLevel logLevel)
logLevel
- void logMessage(LogLevel logLevel, String message, Object... args)
logLevel
- message
- 采用{0} {1} 方式占位args
- void logMessage(LogLevel logLevel, String message, Context context)
logLevel
- message
- 采用{name} {$age} 方式占位context
- void infoMessage(String message, Object... args)
message
- 采用{0} {1} 方式占位args
- void debugMessage(String message, Object... args)
message
- 采用{0} {1} 方式占位args
- void warnMessage(String message, Object... args)
message
- 采用{0} {1} 方式占位args
- void traceMessage(String message, Object... args)
message
- 采用{0} {1} 方式占位args
- void log(LogLevel logLevel, Locale locale, String code, Object... args)
logLevel
- locale
- code
- args
- void log(LogLevel logLevel, String code, Object... args)
logLevel
- code
- args
- void log(LogLevel logLevel, Locale locale, String code, Context context)
logLevel
- locale
- code
- context
- void log(LogLevel logLevel, String code, Context context)
logLevel
- code
- context
- void info(Locale locale, String code, Object... args)
locale
- code
- args
- void info(Locale locale, String code, Context context)
locale
- code
- context
- void debug(Locale locale, String code, Object... args)
locale
- code
- args
- void debug(Locale locale, String code, Context context)
locale
- code
- context
- void warn(Locale locale, String code, Object... args)
locale
- code
- args
- void warn(Locale locale, String code, Context context)
locale
- code
- context
- void trace(Locale locale, String code, Object... args)
locale
- code
- args
- void trace(Locale locale, String code, Context context)
locale
- code
- context
- void error(String code)
void error(Throwable throwable)
void removeFromMDC(String key)
key
- int getMaxBufferRecords()
void setMaxBufferRecords(int bufferRecords)
bufferRecords
- 设置限制记录数Copyright © 2006–2018 TinyGroup. All rights reserved.