diff --git a/swift/common/utils.py b/swift/common/utils.py index d765d122f7..ce765c9105 100644 --- a/swift/common/utils.py +++ b/swift/common/utils.py @@ -1919,6 +1919,37 @@ class LogAdapter(logging.LoggerAdapter, object): self.server = server self.warn = self.warning + # There are a few properties needed for py35; see + # - https://bugs.python.org/issue31457 + # - https://github.com/python/cpython/commit/1bbd482 + # - https://github.com/python/cpython/commit/0b6a118 + # - https://github.com/python/cpython/commit/ce9e625 + def _log(self, level, msg, args, exc_info=None, extra=None, + stack_info=False): + """ + Low-level log implementation, proxied to allow nested logger adapters. + """ + return self.logger._log( + level, + msg, + args, + exc_info=exc_info, + extra=extra, + stack_info=stack_info, + ) + + @property + def manager(self): + return self.logger.manager + + @manager.setter + def manager(self, value): + self.logger.manager = value + + @property + def name(self): + return self.logger.name + @property def txn_id(self): if hasattr(self._cls_thread_local, 'txn_id'):