diff options
-rwxr-xr-x | effiapi | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -207,10 +207,12 @@ class API: ] for route in routes: + logging.debug('Adding route', repr(route)) bottleapp.route(**route) def _call(self, callback): def helper(): + logging.debug('_call called') try: r = bottle.request logging.info('Request: method=%s', r.method) @@ -221,7 +223,7 @@ class API: logging.info('Request: body: %r', r.body.read()) ret = callback() except BaseException as e: - logging.error(str(e)) + logging.error(str(e), exc_info=True) raise else: return ret @@ -301,6 +303,10 @@ else: logging.info("Using RealHTTPAPI") httpapi = RealHTTPAPI() +logging.debug('Creating API') app = bottle.default_app() api = API(httpapi, app, config) + +logging.info('Starting application') app.run(host='127.0.0.1', port=8080) +logglng.critical('Application ended') |