]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Déplacement du logger dans utils
authorAndré Ribes <andre.ribes@edf.fr>
Wed, 9 Mar 2011 14:31:01 +0000 (15:31 +0100)
committerAndré Ribes <andre.ribes@edf.fr>
Wed, 9 Mar 2011 14:31:01 +0000 (15:31 +0100)
src/daSalome/daGUI/ADAO.py
src/daSalome/daGUI/ADAOGUI.py
src/daSalome/daGUI/daEficasWrapper/adaoEficasWrapper.py
src/daSalome/daGUI/daGuiImpl/Makefile.am
src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py
src/daSalome/daGUI/daGuiImpl/adaoLogger.py [deleted file]
src/daSalome/daGUI/daUtils/Makefile.am
src/daSalome/daGUI/daUtils/adaoLogger.py [new file with mode: 0644]

index 0d1e1e3ec1db11e21c916a5e3b1d12a6c393af88..18756212cf8ff5d321162cded365097ba75229d1 100644 (file)
@@ -21,7 +21,7 @@ import ADAO_COMPONENT__POA
 import SALOME_ComponentPy
 import SALOME_DriverPy
 
-from daGuiImpl.adaoLogger import *
+from daUtils.adaoLogger import *
 
 class ADAO(ADAO_COMPONENT__POA.ADAO_ENGINE,
            SALOME_ComponentPy.SALOME_ComponentPy_i,
index 43b361ec2d7471c9d52a8c6271e6fdcfd874a5d0..caffc37b83a288fc3e7e54e23a260c767ba36ebc 100644 (file)
@@ -30,7 +30,7 @@ reasons:
 """
 
 from daGuiImpl import ADAOGUI_impl as GuiImpl
-from daGuiImpl import adaoLogger
+from daUtils import adaoLogger
 
 adaoLogger.debug("Import ADAOGUI")
 
index 8538879d685d9f91e7c2b7278231e14f5e00482f..d48d2b6142b417f67474447cc10514aacb1c0bd7 100644 (file)
@@ -28,7 +28,7 @@ from PyQt4.QtCore import *        # Import from PyQT
 from PyQt4.QtAssistant import *   # Import from PyQT
 
 from daUtils.adaoEficasEvent import *
-from daGuiImpl.adaoLogger import *
+from daUtils.adaoLogger import *
 
 #
 # ============================================
index 4ea27e78c834ba5fd4e94e601f980952206beb6e..17cfa25ebfe1bfb16c19bd07109105e2b89243a5 100644 (file)
@@ -28,7 +28,6 @@ mypkgpython_PYTHON = \
                     adaoGuiHelper.py \
                     adaoModuleHelper.py \
                     adaoStudyEditor.py \
-                    adaoLogger.py \
                     adaoCase.py
 
 
index 61730adeea8d1d857980c27bd2e14c1f612248f8..b58b278fac344ecb87ab86df9742d226dabba7fb 100644 (file)
@@ -39,7 +39,7 @@ from daEficasWrapper.adaoEficasWrapper import AdaoEficasWrapper
 from daUtils.adaoEficasEvent import *
 import adaoGuiHelper
 import adaoStudyEditor
-import adaoLogger
+from daUtils import adaoLogger
 
 __cases__ = {}
 
diff --git a/src/daSalome/daGUI/daGuiImpl/adaoLogger.py b/src/daSalome/daGUI/daGuiImpl/adaoLogger.py
deleted file mode 100644 (file)
index c0c8cad..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-# -*- coding: utf-8 -*-
-#  Copyright (C) 2010 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.
-#
-#  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
-#
-
-from salome.kernel.logger import Logger
-from salome.kernel import termcolor
-
-adao_logger = Logger("ADAO")
-adao_engine_logger = Logger("ADAO ENGINE")
-
-def info(msg, logger = "ADAO"):
-
-  if logger == "ADAO":
-    adao_logger.setColor(termcolor.BLUE)
-    adao_logger.info(msg)
-  elif logger == "ENGINE":
-    adao_engine_logger.setColor(termcolor.BLUE)
-    adao_engine_logger.info(msg)
-
-def debug(msg, logger = "ADAO"):
-
-  if logger == "ADAO":
-    adao_logger.setColor(termcolor.GREEN)
-    adao_logger.debug(msg)
-  elif logger == "ENGINE":
-    adao_engine_logger.setColor(termcolor.GREEN)
-    adao_engine_logger.debug(msg)
-
-def error(msg, logger = "ADAO"):
-
-  if logger == "ADAO":
-    adao_logger.setColor(termcolor.RED)
-    adao_logger.error(msg)
-  elif logger == "ENGINE":
-    adao_engine_logger.setColor(termcolor.RED)
-    adao_engine_logger.error(msg)
-
-def warning(msg, logger = "ADAO"):
-
-  if logger == "ADAO":
-    adao_logger.setColor(termcolor.CYAN)
-    adao_logger.warning(msg)
-  elif logger == "ENGINE":
-    adao_engine_logger.setColor(termcolor.CYAN)
-    adao_engine_logger.warning(msg)
index 9315c40ebba6185da9c1ae619a7cb860198f9ac3..4a03778f946cbdfbe256071271b7874028b8bde7 100644 (file)
@@ -24,5 +24,6 @@ mypkgpythondir =$(salomepythondir)/daUtils
 mypkgpython_PYTHON = \
                     __init__.py \
                     adaoEficasEvent.py \
+                    adaoLogger.py \
                     enumerate.py
 
diff --git a/src/daSalome/daGUI/daUtils/adaoLogger.py b/src/daSalome/daGUI/daUtils/adaoLogger.py
new file mode 100644 (file)
index 0000000..c0c8cad
--- /dev/null
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+#  Copyright (C) 2010 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.
+#
+#  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
+#
+
+from salome.kernel.logger import Logger
+from salome.kernel import termcolor
+
+adao_logger = Logger("ADAO")
+adao_engine_logger = Logger("ADAO ENGINE")
+
+def info(msg, logger = "ADAO"):
+
+  if logger == "ADAO":
+    adao_logger.setColor(termcolor.BLUE)
+    adao_logger.info(msg)
+  elif logger == "ENGINE":
+    adao_engine_logger.setColor(termcolor.BLUE)
+    adao_engine_logger.info(msg)
+
+def debug(msg, logger = "ADAO"):
+
+  if logger == "ADAO":
+    adao_logger.setColor(termcolor.GREEN)
+    adao_logger.debug(msg)
+  elif logger == "ENGINE":
+    adao_engine_logger.setColor(termcolor.GREEN)
+    adao_engine_logger.debug(msg)
+
+def error(msg, logger = "ADAO"):
+
+  if logger == "ADAO":
+    adao_logger.setColor(termcolor.RED)
+    adao_logger.error(msg)
+  elif logger == "ENGINE":
+    adao_engine_logger.setColor(termcolor.RED)
+    adao_engine_logger.error(msg)
+
+def warning(msg, logger = "ADAO"):
+
+  if logger == "ADAO":
+    adao_logger.setColor(termcolor.CYAN)
+    adao_logger.warning(msg)
+  elif logger == "ENGINE":
+    adao_engine_logger.setColor(termcolor.CYAN)
+    adao_engine_logger.warning(msg)