Compare commits

...

1 Commits

Author SHA1 Message Date
Mira Weller cd63399d51 Log RequestId in Celery tasks 2026-07-07 12:16:03 +02:00
2 changed files with 5 additions and 2 deletions
+4
View File
@@ -28,6 +28,10 @@ from django.dispatch import receiver
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pretix.settings")
logger = logging.getLogger(__name__)
from pretix.settings import LOGGING
LOGGING['formatters']['default']['format'] = '[%(asctime)s: %(levelname)s/%(processName)s] RequestId=%(request_id)s %(name)s %(module)s %(message)s'
from django.conf import settings
app = Celery('pretix')
+1 -2
View File
@@ -619,8 +619,6 @@ LOGGING = {
'default': {
'format': (
'%(levelname)s %(asctime)s RequestId=%(request_id)s %(name)s %(module)s %(message)s'
if REQUEST_ID_HEADER
else '%(levelname)s %(asctime)s %(name)s %(module)s %(message)s'
)
},
},
@@ -707,6 +705,7 @@ LOGGING = {
},
},
}
CELERY_WORKER_HIJACK_ROOT_LOGGER = False
SENTRY_ENABLED = False
if config.has_option('sentry', 'dsn') and not any(c in sys.argv for c in ('shell', 'shell_scoped', 'shell_plus')):