Add config example for rotating logs
Add examples for logging.conf and wf_trace_logging.conf to setup rotating logs for mistral.log and mistral_wf_trace.log. Change-Id: I85be48f2e98f5b7e9b8dbc339fa8de2dd7e78449 Implements: blueprint mistral-conf-rotating-log
This commit is contained in:
parent
cb1a809c6d
commit
d6e1f590fa
32
etc/logging.conf.sample.rotating
Normal file
32
etc/logging.conf.sample.rotating
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
[loggers]
|
||||||
|
keys=root
|
||||||
|
|
||||||
|
[handlers]
|
||||||
|
keys=consoleHandler, fileHandler
|
||||||
|
|
||||||
|
[formatters]
|
||||||
|
keys=verboseFormatter, simpleFormatter
|
||||||
|
|
||||||
|
[logger_root]
|
||||||
|
level=DEBUG
|
||||||
|
handlers=consoleHandler, fileHandler
|
||||||
|
|
||||||
|
[handler_consoleHandler]
|
||||||
|
class=StreamHandler
|
||||||
|
level=INFO
|
||||||
|
formatter=simpleFormatter
|
||||||
|
args=(sys.stdout,)
|
||||||
|
|
||||||
|
[handler_fileHandler]
|
||||||
|
class=logging.handlers.RotatingFileHandler
|
||||||
|
level=INFO
|
||||||
|
formatter=verboseFormatter
|
||||||
|
args=("/var/log/mistral.log", "a", 10485760, 5)
|
||||||
|
|
||||||
|
[formatter_verboseFormatter]
|
||||||
|
format=%(asctime)s %(thread)s %(levelname)s %(module)s [-] %(message)s
|
||||||
|
datefmt=
|
||||||
|
|
||||||
|
[formatter_simpleFormatter]
|
||||||
|
format=%(asctime)s %(levelname)s [-] %(message)s
|
||||||
|
datefmt=
|
47
etc/wf_trace_logging.conf.sample.rotating
Normal file
47
etc/wf_trace_logging.conf.sample.rotating
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
[loggers]
|
||||||
|
keys=workflow_trace,root
|
||||||
|
|
||||||
|
[handlers]
|
||||||
|
keys=consoleHandler, wfTraceFileHandler, fileHandler
|
||||||
|
|
||||||
|
[formatters]
|
||||||
|
keys=wfFormatter, simpleFormatter, verboseFormatter
|
||||||
|
|
||||||
|
[logger_workflow_trace]
|
||||||
|
level=INFO
|
||||||
|
handlers=consoleHandler, wfTraceFileHandler
|
||||||
|
qualname=workflow_trace
|
||||||
|
|
||||||
|
[logger_root]
|
||||||
|
level=INFO
|
||||||
|
handlers=fileHandler
|
||||||
|
|
||||||
|
[handler_fileHandler]
|
||||||
|
class=logging.handlers.RotatingFileHandler
|
||||||
|
level=INFO
|
||||||
|
formatter=verboseFormatter
|
||||||
|
args=("/var/log/mistral.log", "a", 10485760, 5)
|
||||||
|
|
||||||
|
[handler_consoleHandler]
|
||||||
|
class=StreamHandler
|
||||||
|
level=INFO
|
||||||
|
formatter=simpleFormatter
|
||||||
|
args=(sys.stdout,)
|
||||||
|
|
||||||
|
[handler_wfTraceFileHandler]
|
||||||
|
class=logging.handlers.RotatingFileHandler
|
||||||
|
level=INFO
|
||||||
|
formatter=wfFormatter
|
||||||
|
args=("/var/log/mistral_wf_trace.log", "a", 10485760, 5)
|
||||||
|
|
||||||
|
[formatter_verboseFormatter]
|
||||||
|
format=%(asctime)s %(thread)s %(levelname)s %(module)s [-] %(message)s
|
||||||
|
datefmt=
|
||||||
|
|
||||||
|
[formatter_simpleFormatter]
|
||||||
|
format=%(asctime)s %(levelname)s [-] %(message)s
|
||||||
|
datefmt=
|
||||||
|
|
||||||
|
[formatter_wfFormatter]
|
||||||
|
format=%(asctime)s WF [-] %(message)s
|
||||||
|
datefmt=
|
Loading…
Reference in New Issue
Block a user