forked from ScoDoc/ScoDoc
Modif log (vers console) en mode debug
This commit is contained in:
parent
426865c9c5
commit
59649b713d
@ -486,12 +486,12 @@ def log(msg: str, silent_test=True):
|
||||
# Flask Working outside of application context.
|
||||
pass
|
||||
|
||||
if current_app:
|
||||
if current_app and not current_app.config["DEBUG"]:
|
||||
current_app.logger.info(msg)
|
||||
else:
|
||||
sys.stdout.flush()
|
||||
sys.stderr.write(
|
||||
"[%s] scodoc: %s\n" % (time.strftime("%a %b %d %H:%M:%S %Y"), msg)
|
||||
f"""[{time.strftime("%a %b %d %H:%M:%S %Y")}] scodoc: {msg}\n"""
|
||||
)
|
||||
sys.stderr.flush()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user