REM: Logger config

ipm
Kamal Curi 2 years ago
parent a3c01cfe13
commit c6216d67b5

@ -37,45 +37,6 @@ QUOTE_STACK = os.environ.get('NEEBLE_STACK_FILE', '/opt/neeble/id.list')
# Define the path for the --rq leaderboard file # Define the path for the --rq leaderboard file
RQ_LEADERBOARD = os.environ.get('RQ_LEADERBOARD_FILE', '/opt/neeble/rqlb.list') RQ_LEADERBOARD = os.environ.get('RQ_LEADERBOARD_FILE', '/opt/neeble/rqlb.list')
# Logging custom config.
LOGGING_CONFIG = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'default': {
'format': '[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s',
},
},
'handlers': {
'console': {
'level': LOGLEVEL,
'class': 'logging.StreamHandler',
'formatter': 'default',
},
'logfile': {
'level': LOGLEVEL,
'class': 'logging.handlers.RotatingFileHandler',
'filename': '/tmp/neeble.log',
'maxBytes': 50000,
'backupCount': 9,
'formatter': 'default',
},
},
'loggers': {
'': {
'level': LOGLEVEL,
'handlers': ['console', 'logfile'],
'propagate': False,
},
'neeble': {
'level': LOGLEVEL,
'handlers': ['console', 'logfile'],
'propagate': False,
},
},
}
logger.dictConfig(LOGGING_CONFIG)
## INSTRUCTIONS ON SETTING UP PERMISSIONS: ## INSTRUCTIONS ON SETTING UP PERMISSIONS:
# Permissions are now granular, more than one distinct role # Permissions are now granular, more than one distinct role
# can execute the commands, whatever roles are inside the # can execute the commands, whatever roles are inside the

Loading…
Cancel
Save