类 LogBase
java.lang.Object
com.alibaba.csp.sentinel.log.LogBase
The base config class for logging.
The default log base directory is ${user.home}/logs/csp/. We can use the LOG_DIR
property to override it. The default log file name dose not contain pid, but if multi-instances of the same service
are running in the same machine, we may want to distinguish the log file by process ID number.
In this case, LOG_NAME_USE_PID property could be configured as "true" to turn on this switch.
- 作者:
- Carpenter Lee, Eric Zhao
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static StringGet the log file base directory path, which is guaranteed ended withFile.separator.static StringGet the log file charset.static Levelstatic StringGet the log file output type.static booleanWhether log file name should contain pid.
-
字段详细资料
-
LOG_DIR
- 另请参阅:
-
LOG_NAME_USE_PID
- 另请参阅:
-
LOG_OUTPUT_TYPE
- 另请参阅:
-
LOG_CHARSET
- 另请参阅:
-
LOG_LEVEL
- 另请参阅:
-
LOG_OUTPUT_TYPE_FILE
Output biz log (e.g. RecordLog and CommandCenterLog) to file.- 另请参阅:
-
LOG_OUTPUT_TYPE_CONSOLE
Output biz log (e.g. RecordLog and CommandCenterLog) to console.- 另请参阅:
-
LOG_CHARSET_UTF8
- 另请参阅:
-
-
构造器详细资料
-
LogBase
public LogBase()
-
-
方法详细资料
-
isLogNameUsePid
public static boolean isLogNameUsePid()Whether log file name should contain pid. This switch is configured byLOG_NAME_USE_PIDsystem property.- 返回:
- true if log file name should contain pid, return true, otherwise false
-
getLogBaseDir
Get the log file base directory path, which is guaranteed ended withFile.separator.- 返回:
- log file base directory path
-
getLogOutputType
Get the log file output type.- 返回:
- log output type, "file" by default
-
getLogCharset
Get the log file charset.- 返回:
- the log file charset, "utf-8" by default
-
getLogLevel
-