gregsadetsky / minimalish-django-starter

Django + Vite starter kit & easy deployment using disco
0 stars 1 forks source link

default always log on prod? #10

Open gregsadetsky opened 9 months ago

gregsadetsky commented 9 months ago

I always end up adding


# IN BASE.PY

from django.utils.log import DEFAULT_LOGGING

# start from default values -- so that they can be overriden later
# https://stackoverflow.com/a/25508761
LOGGING = DEFAULT_LOGGING

# IN PROD.PY

# default logging doesn't log to console with DEBUG=False
# see https://github.com/django/django/blob/main/django/utils/log.py
# override i.e. always log to console
LOGGING["handlers"]["console"] = {
    "class": "logging.StreamHandler",
}

to prod.py - otherwise exceptions on prod don't have any info....! is this normal/should I default to this i.e. add it here?

gregsadetsky commented 7 months ago

YOU SHOULD ADD IT THERE

gregsadetsky commented 2 months ago

YOU REALLY SHOULD

gregsadetsky commented 4 weeks ago

YES