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
This commit is contained in:
Clay Gerrard
2016-09-20 23:44:32 -07:00
committed by Tim Burke
parent b4c1517ddd
commit 3b889331b3

View File

@@ -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):