Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Feature request: Add sample LOGGING #74

Open
shangxiao opened this issue Aug 16, 2017 · 3 comments
Open

Feature request: Add sample LOGGING #74

shangxiao opened this issue Aug 16, 2017 · 3 comments

Comments

@shangxiao
Copy link

Might be worth considering adding a sample LOGGING config to show exceptions in the Heroku logs?

@akshaybabloo
Copy link
Contributor

Something like

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'verbose': {
            'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d: %(message)s'
        },
        'simple': {
            'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
        },
    },
    'handlers': {
        'console': {
            'level': 'INFO',
            'class': 'logging.StreamHandler',
            'formatter': 'simple'
        }
    },
    'loggers': {
        '': {
            'handlers': ['console'],
            'level': 'INFO',
            'propagate': True
        },
        'django.request': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': False
        },
    }
}

I use this.

@shangxiao
Copy link
Author

@akshaybabloo well i was thinking something simple that developers could expand on like what's listed here: https://chrxr.com/django-error-logging-configuration-heroku/

@kennethreitz
Copy link
Contributor

This seems like a good idea!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants