ATLAS Offline Software
Loading...
Searching...
No Matches
python.Logging.AthenaLogger Class Reference

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

Inheritance diagram for python.Logging.AthenaLogger:
Collaboration diagram for python.Logging.AthenaLogger:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

 setLevel (self, level)
 setFormat (self, fmt=None, datefmt=None)
 mapLevelLoggingToGaudi (self, level)
 mapLevelGaudiToLogging (self, level)
 all (self, msg, *args, **kwargs)
 verbose (self, msg, *args, **kwargs)

Static Public Attributes

 root
 manager

Static Private Attributes

dict __levelmap

Detailed Description

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

Definition at line 31 of file Control/AthenaCommon/python/Logging.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Member Function Documentation

◆ all()

python.Logging.AthenaLogger.all ( self,
msg,
* args,
** kwargs )

Definition at line 71 of file Control/AthenaCommon/python/Logging.py.

71 def all( self, msg, *args, **kwargs):
72 if self.manager.disable >= logging.ALL:
73 return
74 if logging.ALL >= self.getEffectiveLevel():
75 self._log( logging.ALL, msg, args, **kwargs )
76

◆ mapLevelGaudiToLogging()

python.Logging.AthenaLogger.mapLevelGaudiToLogging ( self,
level )

Definition at line 65 of file Control/AthenaCommon/python/Logging.py.

65 def mapLevelGaudiToLogging( self, level ):
66 try:
67 return self.__levelmap[ level ]
68 except KeyError:
69 return level
70

◆ mapLevelLoggingToGaudi()

python.Logging.AthenaLogger.mapLevelLoggingToGaudi ( self,
level )

Definition at line 58 of file Control/AthenaCommon/python/Logging.py.

58 def mapLevelLoggingToGaudi( self, level ):
59 for k,v in self.__levelmap.items():
60 if v == level:
61 return k
62 return level
63

◆ setFormat()

python.Logging.AthenaLogger.setFormat ( self,
fmt = None,
datefmt = None )

Definition at line 48 of file Control/AthenaCommon/python/Logging.py.

48 def setFormat( self, fmt = None, datefmt = None ):
49 for h in log.handlers :
50 if not fmt:
51 fmt = h.formatter.format
52 if not datefmt:
53 datefmt = h.formatter.datefmt
54
55 h.setFormatter( logging.Formatter( fmt = fmt, datefmt = datefmt ) )
56

◆ setLevel()

python.Logging.AthenaLogger.setLevel ( self,
level )

Definition at line 40 of file Control/AthenaCommon/python/Logging.py.

40 def setLevel( self, level ):
41 try:
42 level = self.__levelmap[ level ]
43 except KeyError:
44 pass
45
46 super( AthenaLogger, self ).setLevel( level )
47

◆ verbose()

python.Logging.AthenaLogger.verbose ( self,
msg,
* args,
** kwargs )

Definition at line 77 of file Control/AthenaCommon/python/Logging.py.

77 def verbose( self, msg, *args, **kwargs):
78 if self.manager.disable >= logging.VERBOSE:
79 return
80 if logging.VERBOSE >= self.getEffectiveLevel():
81 self._log( logging.VERBOSE, msg, args, **kwargs )
82
83
84# now change the Logger class and make sure to reset the 'root' logger (which
85# is created on logging import and will otherwise have the old class)
bool verbose
Definition hcg.cxx:73

Member Data Documentation

◆ __levelmap

dict python.Logging.AthenaLogger.__levelmap
staticprivate
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 32 of file Control/AthenaCommon/python/Logging.py.

◆ manager

python.Logging.AthenaLogger.manager
static

Definition at line 89 of file Control/AthenaCommon/python/Logging.py.

◆ root

python.Logging.AthenaLogger.root
static

Definition at line 87 of file Control/AthenaCommon/python/Logging.py.


The documentation for this class was generated from the following file: