From 3b889331b30f9a02efc38bc451b2ab625caffdd1 Mon Sep 17 00:00:00 2001 From: Clay Gerrard Date: Tue, 20 Sep 2016 23:44:32 -0700 Subject: [PATCH] Make NullLogger more logger like eventlet.wsgi.server is adaptive to dealing with the named log argument being either a file like or a log like [1], but message handling is a more direct pass through if it's a log like. Since all we want to do is make eventlet's logging it a noop - it's easy to provide either interface! 1. https://github.com/eventlet/eventlet/blob/4d2cdc/eventlet/wsgi.py#L246 Change-Id: I2d792176c96931eafb3f140e6653ba8b31eda429 --- swift/common/utils.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/swift/common/utils.py b/swift/common/utils.py index dad6448e0a..7b71e052ba 100644 --- a/swift/common/utils.py +++ b/swift/common/utils.py @@ -1367,6 +1367,27 @@ class NullLogger(object): # "Logs" the args to nowhere pass + def exception(self, *args): + pass + + def critical(self, *args): + pass + + def error(self, *args): + pass + + def warning(self, *args): + pass + + def info(self, *args): + pass + + def debug(self, *args): + pass + + def log(self, *args): + pass + class LoggerFileObject(object):