diff --git a/etc/emqx.conf b/etc/emqx.conf index 56fcf5ffc..e63e4a55c 100644 --- a/etc/emqx.conf +++ b/etc/emqx.conf @@ -328,83 +328,61 @@ rpc.socket_keepalive_count = 9 ## Log ##-------------------------------------------------------------------- -## Sets the log dir. +## Where to emit the logs. ## -## Value: Folder -log.dir = {{ platform_log_dir }} +## Value: off | file | stdio | both +## - 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. -## -## 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. +## Sets the severity level for logs that written to stdio. ## ## Value: debug | info | notice | warning | error | critical | alert | emergency ## ## 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 -## 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. -## -## Value: Number(bytes) -## log.console.size = 10485760 - -## The rotation count for console log. +## Maximum size of each file that contains specific levels of logs. ## ## 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. -## -## 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. +## The maximum rotation number of files that contains specific levels of logs. ## ## 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. -## -## 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. +## Enable syslog, this will write logs to the rsyslog ## ## Values: on | off log.syslog = on