Commit 62a6601e authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

TriggerMenuMT: add custom log formatter

Add a custom `logging` formatter for all child loggers in the
TriggerMenuMT package. Due to the deep module hierarchy, logger names
often become too long and make log file reading difficult. The custom
formatter now only shows the first and last module name, e.g.:

Py:TriggerMenuMT.HLTMenuConfig.UnconventionalTracking.FullScanLRTConfiguration
becomes
Py:TriggerMenuMT:FullScanLRTConfiguration

Also remove all custom logger names and use the module `__name__`
consistently.
parent fe040508
......@@ -2,7 +2,7 @@
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Bjet.BjetChainConfiguration")
log = logging.getLogger(__name__)
from ..Menu.ChainConfigurationBase import ChainConfigurationBase
......
......@@ -7,7 +7,7 @@ from ..Menu.ChainMerging import mergeChainDefs
import pprint
from AthenaCommon.Logging import logging
log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.Bjet.GenerateBjetChainConfigs' )
log = logging.getLogger(__name__)
log.info("Importing %s",__name__)
......
......@@ -7,7 +7,7 @@
#########################################################################
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.Bphysics.BphysicsChainConfiguration")
log = logging.getLogger(__name__)
from ..Menu.ChainConfigurationBase import ChainConfigurationBase
from ..Muon.MuonChainConfiguration import MuonChainConfiguration
......
......@@ -5,7 +5,7 @@ from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaCommon.CFElements import seqAND
from TrigEDMConfig.TriggerEDMRun3 import recordable
from AthenaCommon.Logging import logging
log = logging.getLogger('BphysicsMenuSequence')
log = logging.getLogger(__name__)
def bmumuxAlgSequence(ConfigFlags):
......
......@@ -3,7 +3,7 @@
from AthenaCommon.GlobalFlags import globalflags
from AthenaCommon.CFElements import seqAND, parOR
from AthenaCommon.Logging import logging
log = logging.getLogger('BphysicsRecoSequences')
log = logging.getLogger(__name__)
def bmumuxRecoSequence(rois, muons):
......
......@@ -5,7 +5,7 @@
###########################################################################
from AthenaCommon.Logging import logging
log = logging.getLogger('TriggerMenuMT.HLTMenuConfig.Bphysics.generateChainConfigs')
log = logging.getLogger(__name__)
logging.getLogger().info('Importing %s', __name__)
from ..Menu.ChainDictTools import splitChainDict
......
......@@ -2,7 +2,7 @@
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.BeamspotChainConfiguration")
log = logging.getLogger(__name__)
from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
from TrigStreamerHypo.TrigStreamerHypoConfigMT import StreamerHypoToolMTgenerator
......
......@@ -2,7 +2,7 @@
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.CalibChainConfiguration")
log = logging.getLogger(__name__)
from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
......
......@@ -2,7 +2,7 @@
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.CosmicChainConfiguration")
log = logging.getLogger(__name__)
from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
......
......@@ -9,7 +9,7 @@ from AthenaCommon.CFElements import seqAND
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.EnhancedBiasDef")
log = logging.getLogger(__name__)
# Low threshold prescaled L1 items - slected at HLT based on TBP bit from L1 in random-seeded events
# High(er) threshold prescaled L1 items - slected at HLT based on TBP bit from L1 in random-seeded events
......
......@@ -6,7 +6,7 @@ from .BeamspotChainConfiguration import BeamspotChainConfiguration
import pprint
from AthenaCommon.Logging import logging
log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.generateChainConfigs' )
log = logging.getLogger(__name__)
log.info("Importing %s",__name__)
......
......@@ -6,7 +6,7 @@ from .CalibChainConfiguration import CalibChainConfiguration
from AthenaCommon.Logging import logging
log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.generateChainConfigs' )
log = logging.getLogger(__name__)
log.info("Importing %s",__name__)
......
......@@ -6,7 +6,7 @@ from .CosmicChainConfiguration import CosmicChainConfiguration
from AthenaCommon.Logging import logging
log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.generateChainConfigs' )
log = logging.getLogger(__name__)
log.info("Importing %s",__name__)
......
......@@ -5,7 +5,7 @@ from ..Menu.ChainMerging import mergeChainDefs
from .EnhancedBiasChainConfiguration import EnhancedBiasChainConfiguration
from AthenaCommon.Logging import logging
log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.generateChainConfigs' )
log = logging.getLogger(__name__)
log.info("Importing %s",__name__)
......
......@@ -6,7 +6,7 @@ from ..Menu.ChainMerging import mergeChainDefs
from AthenaCommon.Logging import logging
log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.generateChainConfigs' )
log = logging.getLogger(__name__)
log.info("Importing %s",__name__)
......
......@@ -6,7 +6,7 @@ from .StreamingChainConfiguration import StreamingChainConfiguration
from AthenaCommon.Logging import logging
log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.generateChainConfigs' )
log = logging.getLogger(__name__)
log.info("Importing %s",__name__)
......
......@@ -2,7 +2,7 @@
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.MonitorChainConfiguration")
log = logging.getLogger(__name__)
from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import MenuSequence
......
......@@ -2,7 +2,7 @@
from AthenaCommon.Logging import logging
logging.getLogger().info("Importing %s",__name__)
log = logging.getLogger("TriggerMenuMT.HLTMenuConfig.CalibCosmicMon.StreamingChainConfiguration")
log = logging.getLogger(__name__)
from TriggerMenuMT.HLTMenuConfig.Menu.ChainConfigurationBase import ChainConfigurationBase
from TrigStreamerHypo.TrigStreamerHypoConfigMT import StreamerHypoToolMTgenerator
......
......@@ -5,7 +5,7 @@
############################################################
from AthenaCommon.Logging import logging
log = logging.getLogger( 'TriggerMenuMT.HLTMenuConfig.Combined' )
log = logging.getLogger(__name__)
logging.getLogger().info("Importing %s",__name__)
def addTopoInfo(theChainConfig, chainDict, listOfChainDefs, lengthOfChainConfigs):
......
......@@ -11,7 +11,7 @@ from DecisionHandling import DecisionHandlingConf
from libpyeformat_helper import SourceIdentifier, SubDetector
from AthenaCommon.CFElements import seqAND, findAlgorithm
from AthenaCommon.Logging import logging
log = logging.getLogger('EventBuildingSequenceSetup')
log = logging.getLogger(__name__)
def addEventBuildingSequence(chain, eventBuildType, chainDict):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment