-
public class DefaultLoggerConfig.Builder extends LoggerConfig.Builder
Builder for DefaultLoggerConfig
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanshowThreadInfoprivate IntegermethodCountprivate LogFormatlogFormatprivate IntegermethodOffset
-
Constructor Summary
Constructors Constructor Description DefaultLoggerConfig.Builder()
-
Method Summary
Modifier and Type Method Description final BooleangetShowThreadInfo()是否显示线程信息,默认:trueWhether to show thread info. final IntegergetMethodCount()要显示的调用栈方法行数,默认:2How many method line to show. final LogFormatgetLogFormat()日志显示格式,默认:LogFormat.PRETTYLog display format, defaults to LogFormat.PRETTY for better readability. final IntegergetMethodOffset()堆栈跟踪偏移量Stack trace offset (hides internal method calls) DefaultLoggerConfig.BuildersetLogFormat(LogFormat logFormat)设置日志显示格式Set log display format. DefaultLoggerConfig.BuildersetMethodOffset(Integer methodOffset)设置堆栈跟踪偏移量Set stack trace offset. DefaultLoggerConfig.BuildersetShowThreadInfo(Boolean showThreadInfo)设置是否显示线程信息Set whether to show thread info. DefaultLoggerConfig.BuildersetMethodCount(Integer methodCount)设置要显示的调用栈方法行数Sets the number of method lines to show. DefaultLoggerConfigbuild()构建 DefaultLoggerConfig -
-
Method Detail
-
getShowThreadInfo
final Boolean getShowThreadInfo()
是否显示线程信息,默认:true
Whether to show thread info. Default true
-
getMethodCount
final Integer getMethodCount()
要显示的调用栈方法行数,默认:2
How many method line to show. Default 2
-
getLogFormat
final LogFormat getLogFormat()
日志显示格式,默认:LogFormat.PRETTY
Log display format, defaults to LogFormat.PRETTY for better readability.
-
getMethodOffset
final Integer getMethodOffset()
堆栈跟踪偏移量
Stack trace offset (hides internal method calls)
-
setLogFormat
DefaultLoggerConfig.Builder setLogFormat(LogFormat logFormat)
设置日志显示格式
Set log display format.
- Parameters:
logFormat- Log display format, defaults to LogFormat.PRETTY for better readability
-
setMethodOffset
DefaultLoggerConfig.Builder setMethodOffset(Integer methodOffset)
设置堆栈跟踪偏移量
Set stack trace offset.
- Parameters:
methodOffset- Stack trace offset (hides internal method calls)
-
setShowThreadInfo
DefaultLoggerConfig.Builder setShowThreadInfo(Boolean showThreadInfo)
设置是否显示线程信息
Set whether to show thread info.
- Parameters:
showThreadInfo- Whether to show thread info or not.
-
setMethodCount
DefaultLoggerConfig.Builder setMethodCount(Integer methodCount)
设置要显示的调用栈方法行数
Sets the number of method lines to show.
- Parameters:
methodCount- How many method line to show.
-
build
DefaultLoggerConfig build()
-
-
-
-