Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mpievolbio-scicomp
RepinPop
Commits
b4cbef72
Commit
b4cbef72
authored
Dec 17, 2021
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/__init__.py
View file @
b4cbef72
...
...
@@ -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 ******************"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment