Fichier de log

This commit is contained in:
Gérald NICOLAS 2021-04-07 14:03:25 +02:00
parent 54dfa7efaa
commit 6a42b4e2db

View File

@ -21,6 +21,7 @@
import logging import logging
import os import os
import tempfile
debug = 10 debug = 10
info = 20 info = 20
@ -29,9 +30,13 @@ error = 40
critical = 50 critical = 50
always = 100 always = 100
filelog = os.path.join(tempfile.gettempdir(),"blocFissure.log")
loglevel = warning loglevel = warning
logging.basicConfig(format='%(funcName)s[%(lineno)d] %(message)s',
level=logging.WARNING) logging.basicConfig(format='%(funcName)s[%(lineno)d] %(message)s', \
level=logging.WARNING, \
filename=filelog)
ch = None ch = None
fh = None fh = None