diff --git a/docs/sanic/logging.md b/docs/sanic/logging.md index c38a1c55..fae8c5ad 100644 --- a/docs/sanic/logging.md +++ b/docs/sanic/logging.md @@ -85,12 +85,12 @@ By default, log_config parameter is set to use sanic.config.LOGGING dictionary f And `filters`: -- accessFilter (using sanic.defaultFilter.DefaultFilter)
+- accessFilter (using sanic.default_filter.DefaultFilter)
The filter that allows only levels in `DEBUG`, `INFO`, and `NONE(0)` -- errorFilter (using sanic.defaultFilter.DefaultFilter)
- The filter taht allows only levels in `WARNING`, `ERROR`, and `CRITICAL` +- errorFilter (using sanic.default_filter.DefaultFilter)
+ The filter that allows only levels in `WARNING`, `ERROR`, and `CRITICAL` There are two `loggers` used in sanic, and **must be defined if you want to create your own logging configuration**: diff --git a/sanic/config.py b/sanic/config.py index c12037fe..3cf8f1ec 100644 --- a/sanic/config.py +++ b/sanic/config.py @@ -1,10 +1,11 @@ -from sanic.defaultFilter import DefaultFilter import os import sys import syslog import platform import types +from sanic.default_filter import DefaultFilter + SANIC_PREFIX = 'SANIC_' _address_dict = { diff --git a/sanic/defaultFilter.py b/sanic/defaultFilter.py deleted file mode 100644 index 9e9508ec..00000000 --- a/sanic/defaultFilter.py +++ /dev/null @@ -1,13 +0,0 @@ -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