Nicer logging configuration.

How the timestamp is logged, and the requests handled by werkzeug too.
This commit is contained in:
2016-03-15 10:29:59 +01:00
parent 43453ff666
commit ab8b32af7f
2 changed files with 9 additions and 3 deletions

View File

@@ -94,7 +94,12 @@ import config
app.config.from_object(config.Deployment)
# Configure logging
logging.basicConfig(level=logging.WARNING)
logging.basicConfig(
level=logging.WARNING,
format='%(asctime)-15s %(levelname)8s %(name)s %(message)s')
logging.getLogger('werkzeug').setLevel(logging.INFO)
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG if app.config['DEBUG'] else logging.INFO)
log.info('Pillar starting')