diff options
| author | Michael Kerrin <michael.kerrin@hp.com> | 2013-04-17 17:35:18 +0000 |
|---|---|---|
| committer | Michael Kerrin <michael.kerrin@hp.com> | 2013-04-18 07:44:39 +0000 |
| commit | 6f91db58e054012c1ec3aac9c446b1c724d2b23c (patch) | |
| tree | 9cd3a8f05d81eca115690c1e642b7f7c3c528921 /nova/openstack | |
| parent | d8e81f6ff6b3160ba6aea5dd814ba734f189f99f (diff) | |
| download | nova-6f91db58e054012c1ec3aac9c446b1c724d2b23c.tar.gz nova-6f91db58e054012c1ec3aac9c446b1c724d2b23c.tar.xz nova-6f91db58e054012c1ec3aac9c446b1c724d2b23c.zip | |
Update the log module from oslo-incubator
Contains fix to stop the logger system from logging events twice.
Also includes PID in default logging_context_format_string
Fixes bug: 1170049
Change-Id: I007786604138c41fbcf1127c01339132c56a6aab
Diffstat (limited to 'nova/openstack')
| -rw-r--r-- | nova/openstack/common/log.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/nova/openstack/common/log.py b/nova/openstack/common/log.py index e40a803c5..49dbadebe 100644 --- a/nova/openstack/common/log.py +++ b/nova/openstack/common/log.py @@ -112,9 +112,9 @@ generic_log_opts = [ log_opts = [ cfg.StrOpt('logging_context_format_string', - default='%(asctime)s.%(msecs)03d %(levelname)s %(name)s ' - '[%(request_id)s %(user)s %(tenant)s] %(instance)s' - '%(message)s', + default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s ' + '%(name)s [%(request_id)s %(user)s %(tenant)s] ' + '%(instance)s%(message)s', help='format string to use for log messages with context'), cfg.StrOpt('logging_default_format_string', default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s ' @@ -432,14 +432,11 @@ def _setup_logging_from_conf(): else: log_root.setLevel(logging.WARNING) - level = logging.NOTSET for pair in CONF.default_log_levels: mod, _sep, level_name = pair.partition('=') level = logging.getLevelName(level_name) logger = logging.getLogger(mod) logger.setLevel(level) - for handler in log_root.handlers: - logger.addHandler(handler) _loggers = {} |
