django logging
log_level = 'debug'
logging = {
'version' : 1,
'disable_existing_loggers' : true,
'formatters' : {
'standard' : {
'format' : '%(asctime)s [%(threadname)s:%(thread)d] [%(name)s:%(lineno)d] z [%(levelname)s]- %(message)s'
},
'verbose' : {
'format' : '[%(asctime)s] %(levelname)-6s %(name)s %(lineno)d %(threadname)s:%(thread)d %(message)s'
},
},
'filters': {
},
'handlers': {
'torstatus': {
'level': log_level,
'class': 'logging.handlers.rotatingfilehandler',
'filename': os.path.join(base_dir ,'logs/torstatus.log'),
'maxbytes': 1024*1024*5, # 5 mb
'backupcount': 5,
'formatter': 'verbose',
},
},
'loggers': {
'torstatus': {
'handlers': ['torstatus'],
'level': log_level,
'propagate': false
},
}
}