From 6a42b4e2db5277b4d9d8f75c30638b902117582a Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=A9rald=20NICOLAS?= Date: Wed, 7 Apr 2021 14:03:25 +0200 Subject: [PATCH] Fichier de log --- src/Tools/blocFissure/gmu/initLog.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Tools/blocFissure/gmu/initLog.py b/src/Tools/blocFissure/gmu/initLog.py index 22eeb4307..01918d56d 100644 --- a/src/Tools/blocFissure/gmu/initLog.py +++ b/src/Tools/blocFissure/gmu/initLog.py @@ -21,6 +21,7 @@ import logging import os +import tempfile debug = 10 info = 20 @@ -29,9 +30,13 @@ error = 40 critical = 50 always = 100 +filelog = os.path.join(tempfile.gettempdir(),"blocFissure.log") + 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 fh = None -- 2.39.2