diff options
| author | Yaguang Tang <heut2008@gmail.com> | 2012-06-30 02:13:05 +0800 |
|---|---|---|
| committer | Yaguang Tang <heut2008@gmail.com> | 2012-07-18 11:40:09 +0800 |
| commit | d5f2152dcfc4039de8324bdf75f6a2cd844dbdd0 (patch) | |
| tree | 3614b8d9bfe55bdebddc700c06ffb8fc45e76e92 /openstack/common/log.py | |
| parent | ace759e55d7c87dc66a500d598d1355dd3c0408f (diff) | |
| download | oslo-d5f2152dcfc4039de8324bdf75f6a2cd844dbdd0.tar.gz oslo-d5f2152dcfc4039de8324bdf75f6a2cd844dbdd0.tar.xz oslo-d5f2152dcfc4039de8324bdf75f6a2cd844dbdd0.zip | |
fix bug lp:1019348,update openstack-common to support pep8 1.3.
also,this patch turns off pep8 E125 check.
Change-Id: I22d2a94d89530586d614af39af17ae542c5e0cbf
Diffstat (limited to 'openstack/common/log.py')
| -rw-r--r-- | openstack/common/log.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/openstack/common/log.py b/openstack/common/log.py index 9e0ad7e..8a368a1 100644 --- a/openstack/common/log.py +++ b/openstack/common/log.py @@ -66,13 +66,13 @@ log_opts = [ help='prefix each line of exception output with this format'), cfg.ListOpt('default_log_levels', default=[ - 'amqplib=WARN', - 'sqlalchemy=WARN', - 'boto=WARN', - 'suds=INFO', - 'keystone=INFO', - 'eventlet.wsgi.server=WARN' - ], + 'amqplib=WARN', + 'sqlalchemy=WARN', + 'boto=WARN', + 'suds=INFO', + 'keystone=INFO', + 'eventlet.wsgi.server=WARN' + ], help='list of logger=LEVEL pairs'), cfg.BoolOpt('publish_errors', default=False, @@ -89,7 +89,7 @@ log_opts = [ default='[instance: %(uuid)s] ', help='If an instance UUID is passed with the log message, ' 'format it like this'), - ] +] generic_log_opts = [ @@ -105,7 +105,7 @@ generic_log_opts = [ cfg.StrOpt('logfile_mode', default='0644', help='Default file mode used when creating log files'), - ] +] CONF = cfg.CONF @@ -208,9 +208,9 @@ class JSONFormatter(logging.Formatter): def formatException(self, ei, strip_newlines=True): lines = traceback.format_exception(*ei) if strip_newlines: - lines = [itertools.ifilter(lambda x: x, - line.rstrip().splitlines()) - for line in lines] + lines = [itertools.ifilter( + lambda x: x, + line.rstrip().splitlines()) for line in lines] lines = list(itertools.chain(*lines)) return lines @@ -252,9 +252,9 @@ class PublishErrorsHandler(logging.Handler): CONF.list_notifier_drivers): return notifier.api.notify(None, 'error.publisher', - 'error_notification', - notifier.api.ERROR, - dict(error=record.msg)) + 'error_notification', + notifier.api.ERROR, + dict(error=record.msg)) def handle_exception(type, value, tb): |
