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:
@@ -1,3 +1,4 @@
|
|||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
from bson import ObjectId
|
from bson import ObjectId
|
||||||
@@ -91,6 +92,14 @@ app = Eve(settings=settings_path, validator=ValidateCustomFields, auth=NewAuth)
|
|||||||
import config
|
import config
|
||||||
app.config.from_object(config.Deployment)
|
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(
|
bugsnag.configure(
|
||||||
api_key = app.config['BUGSNAG_API_KEY'],
|
api_key = app.config['BUGSNAG_API_KEY'],
|
||||||
project_root = "/data/git/pillar/pillar",
|
project_root = "/data/git/pillar/pillar",
|
||||||
|
Reference in New Issue
Block a user