X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FdaComposant%2FdaCore%2FExtendedLogging.py;h=e09b785ce7d2c3e11e1ecd3298377222e4f17caa;hb=a6845547d27bcdc0928f898a4c8a2e4fc276c69e;hp=c67f0308290c16e5afdb48bdb6a3cade37cff9f3;hpb=58e3efe3bafde4a6439b8947e9e6336d77fe7aad;p=modules%2Fadao.git diff --git a/src/daComposant/daCore/ExtendedLogging.py b/src/daComposant/daCore/ExtendedLogging.py index c67f030..e09b785 100644 --- a/src/daComposant/daCore/ExtendedLogging.py +++ b/src/daComposant/daCore/ExtendedLogging.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (C) 2008-2021 EDF R&D +# Copyright (C) 2008-2023 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 @@ -34,7 +34,7 @@ import ExtendedLogging ; ExtendedLogging.ExtendedLogging(level=20) On peut éventuellement demander à l'objet de sortir aussi les messages dans - un fichier (noms par défaut : Aidsm.log, niveau NOTSET) : + un fichier (noms par défaut : AdaoOutputLogfile.log, niveau NOTSET) : import ExtendedLogging ; ExtendedLogging.ExtendedLogging().setLogfile() Si on veut changer le nom du fichier ou le niveau global de message, il faut @@ -79,7 +79,7 @@ import functools import time from daCore import PlatformInfo -LOGFILE = os.path.join(os.path.abspath(os.curdir),"AssimilationStudy.log") +LOGFILE = os.path.join(os.path.abspath(os.curdir),"AdaoOutputLogfile.log") # ============================================================================== class ExtendedLogging(object): @@ -107,16 +107,20 @@ class ExtendedLogging(object): logging.info( "--------------------------------------------------" ) logging.info( "Library availability:" ) logging.info( "- Python.......: True" ) - logging.info( "- Numpy........: True" ) + logging.info( "- Numpy........: "+str(PlatformInfo.has_numpy) ) logging.info( "- Scipy........: "+str(PlatformInfo.has_scipy) ) logging.info( "- Matplotlib...: "+str(PlatformInfo.has_matplotlib) ) - logging.info( "- Gnuplot......: "+str(PlatformInfo.has_scipy) ) + logging.info( "- Gnuplot......: "+str(PlatformInfo.has_gnuplot) ) logging.info( "- Sphinx.......: "+str(PlatformInfo.has_sphinx) ) logging.info( "- Nlopt........: "+str(PlatformInfo.has_nlopt) ) logging.info( "Library versions:" ) logging.info( "- Python.......: "+p.getPythonVersion() ) logging.info( "- Numpy........: "+p.getNumpyVersion() ) logging.info( "- Scipy........: "+p.getScipyVersion() ) + logging.info( "- Matplotlib...: "+p.getMatplotlibVersion() ) + logging.info( "- Gnuplot......: "+p.getGnuplotVersion() ) + logging.info( "- Sphinx.......: "+p.getSphinxVersion() ) + logging.info( "- Nlopt........: "+p.getNloptVersion() ) logging.info( "" ) def setLogfile(self, filename=LOGFILE, filemode="w", level=logging.NOTSET):