Configured logging module.
It's currently configured very simply, to log to stderr and at DEBUG level when the app is in debug mode, and INFO otherwise.
This commit is contained in:
parent
65f8bdc6c0
commit
bf614e0d54
@ -1,3 +1,4 @@
|
||||
import logging
|
||||
import os
|
||||
import json
|
||||
from bson import ObjectId
|
||||
@ -91,6 +92,14 @@ app = Eve(settings=settings_path, validator=ValidateCustomFields, auth=NewAuth)
|
||||
import config
|
||||
app.config.from_object(config.Deployment)
|
||||
|
||||
# Configure logging
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG if app.config['DEBUG'] else logging.INFO,
|
||||
)
|
||||
log = logging.getLogger(__name__)
|
||||
log.info('Pillar starting')
|
||||
|
||||
|
||||
bugsnag.configure(
|
||||
api_key = app.config['BUGSNAG_API_KEY'],
|
||||
project_root = "/data/git/pillar/pillar",
|
||||
|
Loading…
x
Reference in New Issue
Block a user