Skip to content

Instantly share code, notes, and snippets.

Avatar

Siddharth Pant SiddharthPant

View GitHub Profile
@SiddharthPant
SiddharthPant / celery_app.py
Created Feb 14, 2021
Celery logging done right
View celery_app.py
import os
from celery import Celery
from celery.signals import setup_logging # noqa
# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "src.settings")
app = Celery("src")
@SiddharthPant
SiddharthPant / settings.py
Created Feb 14, 2021
Django logging done right
View settings.py
import logging.config
# ... other settings
LOGGING_CONFIG = None # This empties out Django's logging config
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"verbose": {