diff options
| author | Stuart McLaren <stuart.mclaren@hp.com> | 2012-09-10 09:46:06 +0000 |
|---|---|---|
| committer | Stuart McLaren <stuart.mclaren@hp.com> | 2012-09-11 08:33:00 +0000 |
| commit | ab6ceb0679c47149b34ce96215db16f406fdd160 (patch) | |
| tree | fbc1a13533fe14e5f831964f2b5a3b2b3c886f00 /openstack/common | |
| parent | 1071b9da480d25e7cee556d7f9b483f8ac258ffb (diff) | |
| download | oslo-ab6ceb0679c47149b34ce96215db16f406fdd160.tar.gz oslo-ab6ceb0679c47149b34ce96215db16f406fdd160.tar.xz oslo-ab6ceb0679c47149b34ce96215db16f406fdd160.zip | |
Improve logging of process id
Move process id to a fixed position in the logs, and to
be present for all output (including eventlet and stack traces)
as was the case previously.
Fix for LP bug 1040772.
Change-Id: I82639e730c2887630fbbee608a4d4da24862982d
Diffstat (limited to 'openstack/common')
| -rw-r--r-- | openstack/common/log.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/openstack/common/log.py b/openstack/common/log.py index 49e6107..783ff2d 100644 --- a/openstack/common/log.py +++ b/openstack/common/log.py @@ -54,15 +54,14 @@ log_opts = [ '%(message)s', help='format string to use for log messages with context'), cfg.StrOpt('logging_default_format_string', - default='%(asctime)s %(levelname)s %(name)s [-] %(instance)s' - '%(message)s', + default='%(asctime)s %(process)d %(levelname)s %(name)s [-]' + ' %(instance)s%(message)s', help='format string to use for log messages without context'), cfg.StrOpt('logging_debug_format_suffix', - default='from (pid=%(process)d) %(funcName)s ' - '%(pathname)s:%(lineno)d', + default='%(funcName)s %(pathname)s:%(lineno)d', help='data to append to log format when level is DEBUG'), cfg.StrOpt('logging_exception_prefix', - default='%(asctime)s TRACE %(name)s %(instance)s', + default='%(asctime)s %(process)d TRACE %(name)s %(instance)s', help='prefix each line of exception output with this format'), cfg.ListOpt('default_log_levels', default=[ |
