Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LOGGING = {
- 'version': 1,
- 'disable_existing_loggers': False,
- 'filters': {
- },
- 'formatters': {
- 'colored': {
- '()': 'colorlog.ColoredFormatter', # colored output
- # --> %(log_color)s is very important, that's what colors the line
- 'format': '%(log_color)s[%(levelname)s] %(asctime)s :: %(message)s'
- },
- },
- 'handlers': {
- 'console': {
- 'level': 'DEBUG',
- 'class': 'colorlog.StreamHandler',
- 'formatter': 'colored',
- },
- 'file': {
- 'level': 'DEBUG',
- 'class': 'logging.FileHandler',
- 'filename': '/var/log/app/django.log',
- 'formatter': 'colored',
- },
- },
- 'loggers': {
- '': {
- 'handlers': ['console', 'file'],
- 'level': 'DEBUG',
- 'propagate': False,
- },
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement