import belogging belogging.load(enable_duplication_filter=True, json=True)
USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.1/howto/static-files/ STATIC_URL = '/static/' REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework_simplejwt.authentication.JWTAuthentication', ), 'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'], } SIMPLE_JWT = { 'ACCESS_TOKEN_LIFETIME': timedelta(days=1), 'AUTH_HEADER_TYPES': ('Bearer', ), 'ALGORITHM': 'HS256', 'SIGNING_KEY': SECRET_KEY, 'VERIFYING_KEY': None, 'AUDIENCE': None, 'ISSUER': None, 'USER_ID_FIELD': 'username', } # log LOG_LEVEL = config("LOG_LEVEL", default="INFO") belogging.load(json=True)
import belogging belogging.load() ANY_NAME = "Any Name"
def test_enable_duplication_filter(): configured = load(enable_duplication_filter=True) assert 'logger_duplication' in configured['filters']
def test_enable_duplication_filter_default(): configured = load() assert 'logger_duplication' not in configured['filters']
def test_load_log_format(): configured = load(log_format='%(foobar)s') assert configured['formatters']['default']['format'] == '%(foobar)s'