Merge "Fix needed for keystone middleware logging"
This commit is contained in:
commit
7f6099707c
@ -624,6 +624,11 @@ class SwiftLogFormatter(logging.Formatter):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def format(self, record):
|
def format(self, record):
|
||||||
|
if not hasattr(record, 'server'):
|
||||||
|
# Catch log messages that were not initiated by swift
|
||||||
|
# (for example, the keystone auth middleware)
|
||||||
|
record.server = record.name
|
||||||
|
return logging.Formatter.format(self, record)
|
||||||
msg = logging.Formatter.format(self, record)
|
msg = logging.Formatter.format(self, record)
|
||||||
if (record.txn_id and record.levelno != logging.INFO and
|
if (record.txn_id and record.levelno != logging.INFO and
|
||||||
record.txn_id not in msg):
|
record.txn_id not in msg):
|
||||||
|
Loading…
Reference in New Issue
Block a user