ATLAS Offline Software
Loading...
Searching...
No Matches
python.TriggerMenuMTFormatter Class Reference
Inheritance diagram for python.TriggerMenuMTFormatter:
Collaboration diagram for python.TriggerMenuMTFormatter:

Public Member Functions

 format (self, record)

Detailed Description

Custom formatter for loggers within TriggerMenuMT package.

Logger names of type 'TriggerMenuMT.M1.M2.M3' will be shortened to
'TriggerMenuMT:M3' to avoid long logger names. Since the logging module
automatically applies log formats of parents to children this applies to
all loggers that are created via `logging.getLogger(__name__)` within
the TriggerMenuMT package.

Definition at line 5 of file Trigger/TriggerCommon/TriggerMenuMT/python/__init__.py.

Member Function Documentation

◆ format()

python.TriggerMenuMTFormatter.format ( self,
record )

Definition at line 14 of file Trigger/TriggerCommon/TriggerMenuMT/python/__init__.py.

14 def format(self, record):
15 fields = record.name.split('.')
16 if len(fields)>1:
17 record.name = ':'.join([fields[0], fields[-1]])
18 return super().format(record)
19
20

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