Optimize config for log section

This commit is contained in:
terry-xiaoyu 2018-10-17 01:08:12 +08:00
parent 41b79e4f99
commit 8f5b7a0d05
1 changed files with 39 additions and 61 deletions

View File

@ -328,83 +328,61 @@ rpc.socket_keepalive_count = 9
## Log ## Log
##-------------------------------------------------------------------- ##--------------------------------------------------------------------
## Sets the log dir. ## Where to emit the logs.
## ##
## Value: Folder ## Value: off | file | stdio | both
log.dir = {{ platform_log_dir }} ## - off: disable logs entirely
## - file: write logs to file
## - stdio: write logs to standard I/O
## - both: write logs both to file and standard I/O
log.to = stdio
## Where to emit the console logs. ## Sets the severity level for logs that written to stdio.
##
## Value: off | file | console | both
## - off: disabled
## - file: write to file
## - console: write to stdout
## - both: file and stdout
log.console = console
## Sets the severity level of console log.
## ##
## Value: debug | info | notice | warning | error | critical | alert | emergency ## Value: debug | info | notice | warning | error | critical | alert | emergency
## ##
## Default: error ## Default: error
log.console.level = error log.stdio.level = error
## The file where console logs will be writed to, when 'log.console' is set as 'file'. ## Sets the severity level for logs that written to file.
##
## Value: debug | info | notice | warning | error | critical | alert | emergency
##
## Default: error
log.file.level = error
## Sets the dir for log files.
##
## Value: Folder
log.file.dir = {{ platform_log_dir }}
## The file to where specific levels of logs will be written.
## ##
## Value: File Name ## Value: File Name
## log.console.file = {{ platform_log_dir }}/console.log ## Format: log.file.$level.filename = $filename,
## where "$level" can be one of:
## debug, info, notice, warning, error, critical, alert, emergency
log.file.error.filename = error.log
## Maximum file size for console log. ## Maximum size of each file that contains specific levels of logs.
##
## Value: Number(bytes)
## log.console.size = 10485760
## The rotation count for console log.
## ##
## Value: Number ## Value: Number
## log.console.count = 5 ## Default: 10M
## Format: log.file.$level.max_size = $size
## where "$level" can be one of:
## debug, info, notice, warning, error, critical, alert, emergency
## Supported Unit: B | KB | MB | G
log.file.error.max_size = 10M
## The file where info logs will be writed to. ## The maximum rotation number of files that contains specific levels of logs.
##
## Value: File Name
## log.info.file = {{ platform_log_dir }}/info.log
## Maximum file size for info log.
##
## Value: Number(bytes)
## log.info.size = 10485760
## The rotation count for info log.
## ##
## Value: Number ## Value: Number
## log.info.count = 5 ## Format: log.file.$level.max_num = $number
## where "$level" can be one of:
## debug, info, notice, warning, error, critical, alert, emergency
log.file.error.max_num = 5
## The file where error logs will be writed to. ## Enable syslog, this will write logs to the rsyslog
##
## Value: File Name
log.error.file = {{ platform_log_dir }}/error.log
## Maximum file size for error log.
##
## Value: Number(bytes)
log.error.size = 10485760
## The rotation count for error log.
##
## Value: Number
log.error.count = 5
## Enable the crash log.
##
## Value: on | off
log.crash = on
## The file for crash log.
##
## Value: File Name
log.crash.file = {{ platform_log_dir }}/crash.log
## Enable syslog.
## ##
## Values: on | off ## Values: on | off
log.syslog = on log.syslog = on