In settings.py
set the params
from os.path import join
from logui.classes.logger import LoggingBuilder, Logger
LOGUI_LOGS_DIR = join(BASE_DIR, 'logs')
LOGUI_REQUEST_RESPONSE_LOGGER_NAME = 'global'
LOGUI_URL_PREFIX = 'logui/'
LOGUI_CONTROLLERS_SETTINGS = {
'auth_required': True,
'log_name': False,
'not_auth_redirect': f'/admin/login/?next=/{LOGUI_URL_PREFIX}'
}
LOGGING = LoggingBuilder(
format='{levelname} {asctime}: {message}',
datefmt='%d-%m %H:%M:%S',
loggers=(
Logger(name='tbank', level='DEBUG', include_in=['commerce']),
Logger(name='order', level='DEBUG', include_in=[]),
Logger(name='email', level='DEBUG', include_in=[]),
Logger(name='social_auth', level='DEBUG', include_in=[]),
Logger(name='consultation', level='DEBUG', include_in=[]),
Logger(name='commerce', level='DEBUG', include_in=['tbank']),
Logger(name='global', level='DEBUG', include_in=[
'tbank',
'order',
'email',
'social_auth',
'consultation'
'commerce'
]),
)
).build()
LoggingBuilder.check_loggers(LOGGING)
LOGIN_URL = '/login/'
ADJANGO_BACKENDS_APPS = BASE_DIR / 'apps'
ADJANGO_FRONTEND_APPS = BASE_DIR.parent / 'frontend' / 'src' / 'apps'
ADJANGO_APPS_PREPATH = 'apps.'
ADJANGO_EXCEPTION_REPORT_EMAIL = ('ivanhvalevskey@gmail.com',)
ADJANGO_EXCEPTION_REPORT_TEMPLATE = 'logui/error_report.html'
ADJANGO_USE_CELERY_MAIL_REPORT = False
ADJANGO_CELERY_SEND_MAIL_TASK = send_mail_task_function
ADJANGO_LOGGER_NAME = 'global'
ADJANGO_EMAIL_LOGGER_NAME = 'email'
Read more about adjango