Skip to content

Instantly share code, notes, and snippets.

View SiddharthPant's full-sized avatar
🏠
Working from home

Siddharth Pant SiddharthPant

🏠
Working from home
View GitHub Profile
@SiddharthPant
SiddharthPant / celery_app.py
Created February 14, 2021 11:13
Celery logging done right
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 February 14, 2021 11:02
Django logging done right
import logging.config
# ... other settings
LOGGING_CONFIG = None # This empties out Django's logging config
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"verbose": {