feat: config celery logging via Django (#7371)
* feat: config celery logger via Django * feat: Disable celery's logging config
This commit is contained in:
parent
8f87573144
commit
d2623de615
|
@ -1,14 +1,20 @@
|
||||||
import os
|
import os
|
||||||
import scout_apm.celery
|
import scout_apm.celery
|
||||||
|
|
||||||
from celery import Celery
|
import celery
|
||||||
from scout_apm.api import Config
|
from scout_apm.api import Config
|
||||||
|
|
||||||
|
|
||||||
|
# Disable celery's internal logging configuration, we set it up via Django
|
||||||
|
@celery.signals.setup_logging.connect
|
||||||
|
def on_setup_logging(**kwargs):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
# Set the default Django settings module for the 'celery' program
|
# Set the default Django settings module for the 'celery' program
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ietf.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ietf.settings')
|
||||||
|
|
||||||
app = Celery('ietf')
|
app = celery.Celery('ietf')
|
||||||
|
|
||||||
# Using a string here means the worker doesn't have to serialize
|
# Using a string here means the worker doesn't have to serialize
|
||||||
# the configuration object to child processes.
|
# the configuration object to child processes.
|
||||||
|
|
|
@ -252,17 +252,21 @@ LOGGING = {
|
||||||
'level': 'INFO',
|
'level': 'INFO',
|
||||||
},
|
},
|
||||||
'django.security': {
|
'django.security': {
|
||||||
'handlers': ['console', ],
|
'handlers': ['console', ],
|
||||||
'level': 'INFO',
|
'level': 'INFO',
|
||||||
},
|
},
|
||||||
'oidc_provider': {
|
'oidc_provider': {
|
||||||
'handlers': ['debug_console', ],
|
'handlers': ['debug_console', ],
|
||||||
'level': 'DEBUG',
|
'level': 'DEBUG',
|
||||||
},
|
},
|
||||||
'datatracker': {
|
'datatracker': {
|
||||||
'handlers': ['console', ],
|
'handlers': ['console', ],
|
||||||
'level': 'INFO',
|
'level': 'INFO',
|
||||||
},
|
},
|
||||||
|
'celery': {
|
||||||
|
'handlers': ['console'],
|
||||||
|
'level': 'INFO',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
#
|
#
|
||||||
# No logger filters
|
# No logger filters
|
||||||
|
|
Loading…
Reference in a new issue