Salome HOME
Fichier de log
authorGérald NICOLAS <gerald.nicolas@edf.fr>
Wed, 7 Apr 2021 12:03:25 +0000 (14:03 +0200)
committerGérald NICOLAS <gerald.nicolas@edf.fr>
Wed, 7 Apr 2021 12:03:25 +0000 (14:03 +0200)
src/Tools/blocFissure/gmu/initLog.py

index 22eeb43070d0691db5d17398320790745be15929..01918d56d67bf4d22c4687839fc69f1315d2f6e7 100644 (file)
@@ -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