/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Static Private Attributes
DybPython::Logging::NuWaLogger Class Reference

configure logger module -------------------------------------------------- More...

List of all members.

Public Member Functions

def setLevel
def setFormat
def mapLevelLoggingToGaudi
def mapLevelGaudiToLogging
def all
def verbose

Static Private Attributes

dictionary __levelmap

Detailed Description

configure logger module --------------------------------------------------

specialized logger to allow setting with Gaudi message levels ============

Definition at line 32 of file Logging.py.


Member Function Documentation

def DybPython::Logging::NuWaLogger::setLevel (   self,
  level 
)

Definition at line 41 of file Logging.py.

00042                               :
00043       try:
00044          level = self.__levelmap[ level ]
00045       except KeyError:
00046          pass
00047 
00048       super( NuWaLogger, self ).setLevel( level )

def DybPython::Logging::NuWaLogger::setFormat (   self,
  fmt = None,
  datefmt = None 
)

Definition at line 49 of file Logging.py.

00050                                                     :
00051       for h in log.handlers :
00052          if not fmt:
00053             fmt = h.formatter.format
00054          if not datefmt:
00055             datefmt = h.formatter.datefmt
00056 
00057          h.setFormatter( logging.Formatter( fmt = fmt, datefmt = datefmt ) )

def DybPython::Logging::NuWaLogger::mapLevelLoggingToGaudi (   self,
  level 
)

Definition at line 59 of file Logging.py.

00060                                             :
00061       for k,v in self.__levelmap.items():
00062          if v == level:
00063             return k
00064       return level

def DybPython::Logging::NuWaLogger::mapLevelGaudiToLogging (   self,
  level 
)

Definition at line 66 of file Logging.py.

00067                                             :
00068       try:
00069          return self.__levelmap[ level ]
00070       except KeyError:
00071          return level

def DybPython::Logging::NuWaLogger::all (   self,
  msg,
  args,
  kwargs 
)

Definition at line 72 of file Logging.py.

00073                                        :
00074       if self.manager.disable >= logging.ALL:
00075          return
00076       if logging.ALL >= self.getEffectiveLevel():
00077          apply(self._log, (logging.ALL, msg, args), kwargs)

def DybPython::Logging::NuWaLogger::verbose (   self,
  msg,
  args,
  kwargs 
)

Definition at line 78 of file Logging.py.

00079                                            :
00080       if self.manager.disable >= logging.VERBOSE:
00081          return
00082       if logging.VERBOSE >= self.getEffectiveLevel():
00083          apply(self._log, (logging.VERBOSE, msg, args), kwargs)
00084 
00085 
00086 # now change the Logger class and make sure to reset the 'root' logger (which
00087 # is created on logging import and will otherwise have the old class)
00088 logging.setLoggerClass( NuWaLogger )
00089 logging.root = NuWaLogger( 'root', logging.WARNING )
00090 logging.Logger.root = logging.root
00091 logging.Logger.manager = logging.Manager( logging.Logger.root )
00092 


Member Data Documentation

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.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:55:41 for DybPython by doxygen 1.7.4