Revamp the logging a bit. Not quite done yet.
This commit is contained in:
parent
3fb4fafb33
commit
a5a61576ae
10 changed files with 91 additions and 52 deletions
|
@ -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')
|
Reference in a new issue