From e87ffeadb116d68ca8646b578047cf2c26afaf8a Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sat, 7 May 2011 12:18:32 +0200 Subject: [PATCH] Remove default request logging --- radicale.py | 3 ++- radicale/__init__.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/radicale.py b/radicale.py index 7b7aa9a9..78025762 100755 --- a/radicale.py +++ b/radicale.py @@ -103,7 +103,8 @@ for host in options.hosts.split(','): address, port = host.strip().rsplit(':', 1) address, port = address.strip('[] '), int(port) servers.append( - make_server(address, port, radicale.Application(), server_class)) + make_server(address, port, radicale.Application(), + server_class, radicale.RequestHandler)) # SIGTERM and SIGINT (aka KeyboardInterrupt) should just mark this for shutdown signal.signal(signal.SIGTERM, lambda *_: shutdown_program.set()) diff --git a/radicale/__init__.py b/radicale/__init__.py index 31038e90..ba20cf9d 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -91,6 +91,12 @@ class HTTPSServer(HTTPServer): self.server_activate() +class RequestHandler(wsgiref.simple_server.WSGIRequestHandler): + """HTTP requests handler.""" + def log_message(self, *args, **kwargs): + """Disable inner logging management.""" + + class Application(object): """WSGI application managing calendars.""" def __init__(self):