2015-12-06 19:53:17 +01:00
|
|
|
# Wrapper around Django's runserver to allow filtering logs.
|
|
|
|
|
|
|
|
from django.core.servers.basehttp import WSGIRequestHandler
|
|
|
|
orig_log_message = WSGIRequestHandler.log_message
|
|
|
|
def log_message_monkey(self, format, *args):
|
|
|
|
# Filter output for 200 or 304 responses.
|
|
|
|
if args[1] == '200' or args[1] == '304':
|
|
|
|
return
|
2016-01-27 21:49:19 +01:00
|
|
|
orig_log_message(self, format, *args)
|
2015-12-06 19:53:17 +01:00
|
|
|
|
|
|
|
WSGIRequestHandler.log_message = log_message_monkey
|
|
|
|
|
|
|
|
from django.core.management.commands.runserver import Command
|