Updates logging configuration samples

- Changed all formats to look more like the default formatters. This simplifies parsing
  in tools like logstash etc.
- Changed location of all log files to end up in /var/log instead of /tmp. /var/log is
  a better default than /tmp for log files.
- In wf_trace_conf_logging.conf.sample using separate formatters for different handlers.
  This accounts for the usecase of each handler having its own specific log format to
  reduce redundancy in log statements.

Change-Id: I467f4d493cd379c11cf7e5e872e4baa4faeac674
Closes-Bug: 1322740
This commit is contained in:
manasdk 2014-12-17 01:00:56 +00:00
parent e710ff349e
commit df5f04c58a
2 changed files with 20 additions and 13 deletions

View File

@ -21,12 +21,12 @@ args=(sys.stdout,)
class=FileHandler
level=INFO
formatter=verboseFormatter
args=("/tmp/mistral.log",)
args=("/var/log/mistral.log",)
[formatter_verboseFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
format=%(asctime)s %(thread)s %(levelname)s %(module)s [-] %(message)s
datefmt=
[formatter_simpleFormatter]
format=%(asctime)s - %(levelname)s - %(message)s
format=%(asctime)s %(levelname)s [-] %(message)s
datefmt=

View File

@ -2,14 +2,14 @@
keys=workflow_trace,root
[handlers]
keys=consoleHandler, prettyFileHandler, fileHandler
keys=consoleHandler, wfTraceFileHandler, fileHandler
[formatters]
keys=simpleFormatter
keys=wfFormatter, simpleFormatter, verboseFormatter
[logger_workflow_trace]
level=INFO
handlers=consoleHandler, fileHandler
handlers=consoleHandler, wfTraceFileHandler
qualname=workflow_trace
[logger_root]
@ -19,8 +19,8 @@ handlers=fileHandler
[handler_fileHandler]
class=FileHandler
level=INFO
formatter=simpleFormatter
args=("/tmp/mistral.log",)
formatter=verboseFormatter
args=("/var/log/mistral.log",)
[handler_consoleHandler]
class=StreamHandler
@ -28,13 +28,20 @@ level=INFO
formatter=simpleFormatter
args=(sys.stdout,)
[handler_prettyFileHandler]
[handler_wfTraceFileHandler]
class=FileHandler
level=INFO
formatter=simpleFormatter
args=("/tmp/mistral_wf_trace.log",)
formatter=wfFormatter
args=("/var/log/mistral_wf_trace.log",)
[formatter_verboseFormatter]
format=%(asctime)s %(thread)s %(levelname)s %(module)s [-] %(message)s
datefmt=
[formatter_simpleFormatter]
format=%(asctime)s - WF - %(message)s
datefmt=%y-%m-%d %H:%M:%S
format=%(asctime)s %(levelname)s [-] %(message)s
datefmt=
[formatter_wfFormatter]
format=%(asctime)s WF [-] %(message)s
datefmt=