Created
June 10, 2014 13:47
-
-
Save jfunez/d800d101b61f976bb0c2 to your computer and use it in GitHub Desktop.
django_loggers_settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': True, | |
'formatters': { | |
'standard': { | |
'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s' | |
}, | |
}, | |
'handlers': { | |
'default': { | |
'level':'DEBUG', | |
'class':'logging.handlers.RotatingFileHandler', | |
'filename': '<PATH TO LOGGS FOLDER>/logs/default_log.log', | |
'maxBytes': 1024*1024*5, # 5 MB | |
'backupCount': 5, | |
'formatter':'standard', | |
}, | |
'articletrack': { | |
'level':'DEBUG', | |
'class':'logging.handlers.RotatingFileHandler', | |
'filename': '<PATH TO LOGGS FOLDER>/logs/articletrack.log', | |
'maxBytes': 1024*1024*5, # 5 MB | |
'backupCount': 5, | |
'formatter':'standard', | |
}, | |
'request_handler': { | |
'level':'DEBUG', | |
'class':'logging.handlers.RotatingFileHandler', | |
'filename': '<PATH TO LOGGS FOLDER>/logs/django_request.log', | |
'maxBytes': 1024*1024*5, # 5 MB | |
'backupCount': 5, | |
'formatter':'standard', | |
}, | |
}, | |
'loggers': { | |
'': { | |
'handlers': ['default'], | |
'level': 'DEBUG', | |
'propagate': True | |
}, | |
'django.request': { | |
'handlers': ['request_handler'], | |
'level': 'DEBUG', | |
'propagate': False | |
}, | |
'articletrack.views': { | |
'handlers': ['articletrack'], | |
'level': 'DEBUG', | |
'propagate': True | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment