/logging.py Secret
Last active
March 1, 2017 23:19
This file contains hidden or 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, | |
'handlers': { | |
'console': { | |
'class': 'logging.StreamHandler', | |
'formatter': 'json', | |
'level': 'DEBUG' if __debug__ else 'INFO', | |
'stream': 'ext://sys.stdout', | |
}, | |
'db': { | |
'class': 'marrow.mongo.util.logger.MongoHandler', | |
'uri': DB_URI, | |
'collection': 'logs', | |
'level': 'DEBUG' if __debug__ else 'INFO', | |
} | |
}, | |
'loggers': { | |
'illico': { | |
'level': 'DEBUG' if __debug__ else 'INFO', | |
'handlers': ['console', 'db'], | |
'propagate': False, | |
}, | |
'web': { | |
'level': 'INFO' if __debug__ else 'WARN', | |
'handlers': ['console', 'db'], | |
'propagate': False, | |
}, | |
}, | |
'root': { | |
'level': 'DEBUG' if __debug__ else 'WARN', | |
'handlers': ['console', 'db'], | |
}, | |
'formatters': { | |
'json': {'()': 'marrow.mongo.util.logger.JSONFormatter', 'indent': True}, | |
'mongo': {'()': 'marrow.mongo.util.logger.MongoFormatter'}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment