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