Replace logging backend to log4rs and add log rotation (#1789)
* Replace logging backend to flexi-logger and add log rotation * Changed flexi_logger to log4rs * Disable logging level filtering in Root logger * Support different logging levels for file and stdout * Don't log messages from modules other than Grin-related * Fix formatting * Place backed up compressed log copies into log file directory * Increase default log file size to 16 MiB * Add comment to config file on log_max_size option
This commit is contained in:
+10
-2
@@ -367,7 +367,7 @@ fn comments() -> HashMap<String, String> {
|
||||
retval.insert(
|
||||
"stdout_log_level".to_string(),
|
||||
"
|
||||
#log level for stdout: Critical, Error, Warning, Info, Debug, Trace
|
||||
#log level for stdout: Error, Warning, Info, Debug, Trace
|
||||
".to_string(),
|
||||
);
|
||||
|
||||
@@ -381,7 +381,7 @@ fn comments() -> HashMap<String, String> {
|
||||
retval.insert(
|
||||
"file_log_level".to_string(),
|
||||
"
|
||||
#log level for file: Critical, Error, Warning, Info, Debug, Trace
|
||||
#log level for file: Error, Warning, Info, Debug, Trace
|
||||
".to_string(),
|
||||
);
|
||||
|
||||
@@ -399,6 +399,14 @@ fn comments() -> HashMap<String, String> {
|
||||
".to_string(),
|
||||
);
|
||||
|
||||
retval.insert(
|
||||
"log_max_size".to_string(),
|
||||
"
|
||||
#maximum log file size in bytes before performing log rotation
|
||||
#comment it to disable log rotation
|
||||
".to_string(),
|
||||
);
|
||||
|
||||
retval
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user