Fix camel case module

This commit is contained in:
Eli Uriegas 2017-05-08 20:36:57 -07:00
parent bece3d2bcf
commit 1fb640c313
3 changed files with 5 additions and 17 deletions

View File

@ -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)<br>
- accessFilter (using sanic.default_filter.DefaultFilter)<br>
The filter that allows only levels in `DEBUG`, `INFO`, and `NONE(0)`
- errorFilter (using sanic.defaultFilter.DefaultFilter)<br>
The filter taht allows only levels in `WARNING`, `ERROR`, and `CRITICAL`
- errorFilter (using sanic.default_filter.DefaultFilter)<br>
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**:

View File

@ -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 = {

View File

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