Revamp the logging a bit. Not quite done yet.

This commit is contained in:
Jake Moshenko 2014-05-01 19:44:28 -04:00
parent 3fb4fafb33
commit a5a61576ae
10 changed files with 91 additions and 52 deletions

View file

@ -1,10 +1,8 @@
import logging
import logging.config
from app import app as application
# Initialize logging
application.config['LOGGING_CONFIG']()
from data.model import db as model_db
# Turn off debug logging for boto
@ -41,4 +39,9 @@ def close_db(exc):
application.teardown_request(close_db)
if __name__ == '__main__':
application.run(port=5000, debug=True, threaded=True, host='0.0.0.0')
logging.config.fileConfig('conf/logging_local.conf', disable_existing_loggers=False)
profile = logging.getLogger('application.profiler')
profile.debug('This is a profiling statement')
application.run(port=5000, debug=True, threaded=True, host='0.0.0.0')