public abstract class AbstractLogger extends Object implements ILogger
Constructor and Description |
---|
AbstractLogger() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildEx(String info,
Throwable e,
LogLevel level) |
String |
buildMakeCallerInfo()
获取调用者信息
|
String |
buildMakeStackInfo(Throwable e)
将异常转换为堆栈输出串
|
String |
buildSimplePackageName(String originPackageName) |
ILogger |
depth(int depth)
设置调用者深度
|
boolean |
ex(StringBuilder stack,
Throwable t)
将异常输出到字符缓冲中
|
protected abstract void |
logWrite(LogLevel level,
LogInfo content)
日志写入方法, 需子类实现
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contains, debug, debug, debug, destroy, error, error, error, fatal, fatal, fatal, getLevel, getLogger, getLoggerName, info, info, info, initialize, isDebugEnabled, isErrorEnabled, isFatalEnabled, isInfoEnabled, isInitialized, isTraceEnabled, isWarnEnabled, log, log, log, trace, trace, trace, warn, warn, warn
protected abstract void logWrite(LogLevel level, LogInfo content)
level
- 日志级别content
- 内容public String buildMakeCallerInfo()
public String buildMakeStackInfo(Throwable e)
e
- 需要输出的异常对象public boolean ex(StringBuilder stack, Throwable t)
stack
- 需要输出到的目标字符串缓冲,不可为空t
- 需要输出的异常Copyright © 2022. All rights reserved.