1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2008-2015 EDF R&D
4 # This file is part of SALOME ADAO module
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 from salome.kernel.logger import Logger
24 from salome.kernel import termcolor
26 adao_logger = Logger("ADAO")
27 adao_engine_logger = Logger("ADAO ENGINE")
29 def info(msg, logger = "ADAO"):
32 adao_logger.setColor(termcolor.BLUE)
34 elif logger == "ENGINE":
35 adao_engine_logger.setColor(termcolor.BLUE)
36 adao_engine_logger.info(msg)
38 def debug(msg, logger = "ADAO"):
41 adao_logger.setColor(termcolor.GREEN)
42 adao_logger.debug(msg)
43 elif logger == "ENGINE":
44 adao_engine_logger.setColor(termcolor.GREEN)
45 adao_engine_logger.debug(msg)
47 def error(msg, logger = "ADAO"):
50 adao_logger.setColor(termcolor.RED)
51 adao_logger.error(msg)
52 elif logger == "ENGINE":
53 adao_engine_logger.setColor(termcolor.RED)
54 adao_engine_logger.error(msg)
56 def warning(msg, logger = "ADAO"):
59 adao_logger.setColor(termcolor.CYAN)
60 adao_logger.warning(msg)
61 elif logger == "ENGINE":
62 adao_engine_logger.setColor(termcolor.CYAN)
63 adao_engine_logger.warning(msg)