diff options
Diffstat (limited to 'qc_app/errors.py')
-rw-r--r-- | qc_app/errors.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qc_app/errors.py b/qc_app/errors.py index 7af7696..d7d3858 100644 --- a/qc_app/errors.py +++ b/qc_app/errors.py @@ -3,12 +3,12 @@ import logging import traceback import MySQLdb as mdb -from flask import Flask, request, render_template +from flask import Flask, request, render_template, current_app as app def handle_general_exception(exc: Exception): """Handle generic exceptions.""" trace = traceback.format_exc() - logging.error( + app.logger.error( "Error (%s.%s): Generic unhandled exception!! (URI: %s)\n%s", exc.__class__.__module__, exc.__class__.__name__, request.url, trace) return render_template("unhandled_exception.html", trace=trace) |