Public Member Functions | |
def | setLevel |
def | setFormat |
def | mapLevelLoggingToGaudi |
def | mapLevelGaudiToLogging |
def | all |
def | verbose |
Static Private Attributes | |
dictionary | __levelmap |
Definition at line 32 of file Logging.py.
def DybPython::Logging::NuWaLogger::setLevel | ( | self, | ||
level | ||||
) |
Definition at line 41 of file Logging.py.
00041 : 00042 try: 00043 level = self.__levelmap[ level ] 00044 except KeyError: 00045 pass 00046 00047 super( NuWaLogger, self ).setLevel( level ) 00048 def setFormat( self, fmt = None, datefmt = None ):
def DybPython::Logging::NuWaLogger::setFormat | ( | self, | ||
fmt = None , |
||||
datefmt = None | ||||
) |
Definition at line 49 of file Logging.py.
00049 : 00050 for h in log.handlers : 00051 if not fmt: 00052 fmt = h.formatter.format 00053 if not datefmt: 00054 datefmt = h.formatter.datefmt 00055 00056 h.setFormatter( logging.Formatter( fmt = fmt, datefmt = datefmt ) ) 00057 00058 @classmethod def mapLevelLoggingToGaudi( self, level ):
def DybPython::Logging::NuWaLogger::mapLevelLoggingToGaudi | ( | self, | ||
level | ||||
) |
Definition at line 59 of file Logging.py.
00059 : 00060 for k,v in self.__levelmap.items(): 00061 if v == level: 00062 return k 00063 return level 00064 00065 @classmethod def mapLevelGaudiToLogging( self, level ):
def DybPython::Logging::NuWaLogger::mapLevelGaudiToLogging | ( | self, | ||
level | ||||
) |
Definition at line 66 of file Logging.py.
00066 : 00067 try: 00068 return self.__levelmap[ level ] 00069 except KeyError: 00070 return level 00071 def all( self, msg, *args, **kwargs):
def DybPython::Logging::NuWaLogger::all | ( | self, | ||
msg, | ||||
args, | ||||
kwargs | ||||
) |
Definition at line 72 of file Logging.py.
00072 : 00073 if self.manager.disable >= logging.ALL: 00074 return 00075 if logging.ALL >= self.getEffectiveLevel(): 00076 apply(self._log, (logging.ALL, msg, args), kwargs) 00077 def verbose( self, msg, *args, **kwargs):
def DybPython::Logging::NuWaLogger::verbose | ( | self, | ||
msg, | ||||
args, | ||||
kwargs | ||||
) |
Definition at line 78 of file Logging.py.
00078 : 00079 if self.manager.disable >= logging.VERBOSE: 00080 return 00081 if logging.VERBOSE >= self.getEffectiveLevel(): 00082 apply(self._log, (logging.VERBOSE, msg, args), kwargs) 00083 00084 00085 # now change the Logger class and make sure to reset the 'root' logger (which 00086 # is created on logging import and will otherwise have the old class) 00087 logging.setLoggerClass( NuWaLogger ) 00088 logging.root = NuWaLogger( 'root', logging.WARNING ) 00089 logging.Logger.root = logging.root 00090 logging.Logger.manager = logging.Manager( logging.Logger.root ) 00091 00092 ### configure logger ---------------------------------------------------------
dictionary DybPython::Logging::NuWaLogger::__levelmap [static, private] |
Initial value:
{ Constants.ALL : logging.ALL, Constants.VERBOSE : logging.VERBOSE, Constants.DEBUG : logging.DEBUG, Constants.INFO : logging.INFO, Constants.WARNING : logging.WARNING, Constants.ERROR : logging.ERROR, Constants.FATAL : logging.FATAL }
Definition at line 33 of file Logging.py.