Commit b4cbef72 authored by c.fortmanngrote's avatar c.fortmanngrote
Browse files

Set log level on logger, not on handler.

parent 9c2cdb2f
Pipeline #259016 failed with stages
in 6 minutes and 8 seconds
......@@ -24,14 +24,14 @@ app.config['UPLOAD_DIR'] = upload_dir
formatter = logging.Formatter('%(asctime)s [%(levelname)s] %(module)s: %(message)s')
handler = logging.FileHandler(filename="/tmp/rarefan.log")
handler.setFormatter(formatter)
handler.setLevel(logging.INFO)
if app.config['DEBUG']:
handler.setLevel(logging.DEBUG)
# Configure root logger (this config will trickle down to all module loggers.)
app.logger.addHandler(handler)
app.logger.setLevel(logging.INFO)
if app.config['DEBUG']:
app.logger.setLevel(logging.DEBUG)
if app.debug:
app.logger.debug("****************** Debug mode is active ******************")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment