mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
Add logging configuration for the docker setup
Also remove the PROMETHEUS_URL_PATH from the url, this was just making things complicated to setup
This commit is contained in:
@@ -188,3 +188,31 @@ CELERY_RESULT_BACKEND = env.str("CELERY_BACKEND", "redis://cache:6379/2")
|
||||
#
|
||||
EXPOSE_PROMETHEUS_METRICS = env.bool('EXPOSE_PROMETHEUS_METRICS', False)
|
||||
PROMETHEUS_URL_PATH = env.str('PROMETHEUS_URL_PATH', 'super-secret-path')
|
||||
|
||||
#
|
||||
# Logging
|
||||
#
|
||||
LOGGING = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'formatters': {
|
||||
'simple': {
|
||||
'format': 'level={levelname} ts={asctime} module={module} path={pathname} line={lineno} message={message}',
|
||||
'style': '{',
|
||||
},
|
||||
},
|
||||
'handlers': {
|
||||
'console': {
|
||||
'level': 'DEBUG',
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'simple'
|
||||
},
|
||||
},
|
||||
'loggers': {
|
||||
'': {
|
||||
'handlers': ['console'],
|
||||
'level': env.str('LOG_LEVEL_PYTHON', 'INFO').upper(),
|
||||
'propagate': True,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,5 +353,5 @@ if settings.DEBUG:
|
||||
|
||||
if settings.EXPOSE_PROMETHEUS_METRICS:
|
||||
urlpatterns += [
|
||||
path(f'prometheus/{settings.PROMETHEUS_URL_PATH}/', include('django_prometheus.urls'))
|
||||
path(f'prometheus/', include('django_prometheus.urls'))
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user