Salome HOME
Règles python - Fin
[modules/smesh.git] / src / Tools / blocFissure / gmu / initLog.py
index 57b887e60f42e599f8ed82f21b701840f28d7fe1..7fa3c7f5aab7aaa35f5db97b77e35783f8a97a09 100644 (file)
@@ -1,4 +1,23 @@
 # -*- coding: utf-8 -*-
+# Copyright (C) 2014-2021  EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+"""Initialisations des impressions"""
 
 import logging
 import os
@@ -16,6 +35,7 @@ ch = None
 fh = None
 
 def setLogger(logfile, level, formatter):
+  """setLogger"""
   global ch, fh
   rootLogger = logging.getLogger('')
   if fh is not None:
@@ -35,9 +55,9 @@ def setLogger(logfile, level, formatter):
     rootLogger.addHandler(ch)
     ch.setFormatter(formatter)
   rootLogger.setLevel(level)
-  
-  
+
 def setDebug(logfile=None):
+  """setDebug"""
   global loglevel
   loglevel = debug
   level = logging.DEBUG
@@ -46,6 +66,7 @@ def setDebug(logfile=None):
   logging.info('start Debug %s', loglevel)
 
 def setVerbose(logfile=None):
+  """setVerbose"""
   global loglevel
   loglevel = info
   level = logging.INFO
@@ -54,28 +75,32 @@ def setVerbose(logfile=None):
   logging.info('start Verbose %s', loglevel)
 
 def setRelease(logfile=None):
+  """setRelease"""
   global loglevel
   loglevel = warning
   level = logging.WARNING
   formatter = logging.Formatter('%(funcName)s[%(lineno)d] %(message)s')
   setLogger(logfile, level, formatter)
   logging.warning('start Release %s', loglevel)
-  
+
 def setUnitTests(logfile=None):
+  """setUnitTests"""
   global loglevel
   loglevel = critical
   level = logging.CRITICAL
   formatter = logging.Formatter('%(funcName)s[%(lineno)d] %(message)s')
   setLogger(logfile, level, formatter)
   logging.critical('start UnitTests %s', loglevel)
-  
+
 def setPerfTests(logfile=None):
+  """setPerfTests"""
   global loglevel
   loglevel = critical
   level = logging.CRITICAL
   formatter = logging.Formatter('%(funcName)s[%(lineno)d] %(message)s')
   setLogger(logfile, level, formatter)
   logging.info('start PerfTests %s', loglevel)
-  
+
 def getLogLevel():
+  """getLogLevel"""
   return loglevel