sanic/sanic/log.py
2017-05-08 20:41:34 -07:00

19 lines
363 B
Python

import logging
class DefaultFilter(logging.Filter):
def __init__(self, param=None):
self.param = param
def filter(self, record):
if self.param is None:
return True
if record.levelno in self.param:
return True
return False
log = logging.getLogger('sanic')
netlog = logging.getLogger('network')