From 1222dd0eab698b14c1f855c6a762c44ee51a90c9 Mon Sep 17 00:00:00 2001 From: terry-xiaoyu <506895667@qq.com> Date: Thu, 18 Oct 2018 14:09:24 +0800 Subject: [PATCH] Update log config template --- etc/emqx.conf | 57 ++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/etc/emqx.conf b/etc/emqx.conf index 341f05013..914aa657e 100644 --- a/etc/emqx.conf +++ b/etc/emqx.conf @@ -329,60 +329,57 @@ rpc.socket_keepalive_count = 9 ##-------------------------------------------------------------------- ## Where to emit the logs. +## Enable the console (standard output) logs. ## -## Value: off | file | stdio | both +## Value: off | file | console | both ## - off: disable logs entirely ## - file: write logs to file -## - stdio: write logs to standard I/O +## - console: write logs to standard I/O ## - both: write logs both to file and standard I/O -log.to = stdio +log.to = console -## Sets the severity level for logs written to stdio. +## Sets the log severity level. ## ## Value: debug | info | notice | warning | error | critical | alert | emergency ## ## Default: error -log.stdio.level = error - -## Sets the severity level for logs written to file. -## -## Value: debug | info | notice | warning | error | critical | alert | emergency -## -## Default: error -log.file.level = error +log.level = error ## Sets the dir for log files. ## ## Value: Folder -log.file.dir = {{ platform_log_dir }} +log.dir = {{ platform_log_dir }} -## The file to where specific levels of logs will be written. +## The log filename for logs of level specified in "log.level". ## -## Value: File Name -## 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 +## Value: String +## Default: emqx.log +log.file = emqx.log -## Maximum size of each file that contains specific levels of logs. +## Maximum size of each log file. ## ## Value: Number ## 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 +log.rotation.size = 10M -## The maximum rotation number of files that contains specific levels of logs. +## Maximum rotation count of log files. ## ## Value: Number -## 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 +## Default: 5 +log.rotation.count = 5 -## Enable syslog, this will write logs to the rsyslog +## To create additional log files for specific levels of logs. +## +## Value: File Name +## Format: log.$level.file = $filename, +## where "$level" can be one of: debug, info, notice, warning, +## error, critical, alert, emergency +## Note: Log files for a specific log level will contain all the logs +## that greater than or equal to that level +log.error.file = error.log + +## Enable syslog, to write logs to the rsyslog ## ## Values: on | off log.syslog = on