CMS MessageLogger Service: Specifying Parameters for Individual Destinationss

import FWCore.ParameterSet.Config as cms
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger = cms.Service("MessageLogger" ,
        destinations = cms.untracked.vstring(
                                              'detailedInfo'
                                               ,'critical'
                                               ,'jobdebug'
                                               ,'anotherfile'
                                               ,'cerr'
        ),                                      
      categories = cms.untracked.vstring(
                                        'unimportant'
                                        ,'trkwarning'
                                        ,'serious_matter' 
      ),
      critical       = cms.untracked.PSet(
                        threshold = cms.untracked.string('ERROR'),
                        default     = cms.untracked.PSet (
                                                         limit = cms.untracked.int32(10),
                                                         timespan = cms.untracked.int32(180)
                                                        ),
                        serious_matter = cms.untracked.PSet(
                                                        limit=cms.untracked.int32(100000)
                                                        )                        
       ),                                                         
      detailedInfo   = cms.untracked.PSet(
                        threshold = cms.untracked.string('INFO'),
                        default     = cms.untracked.PSet (  
                                                         limit = cms.untracked.int32(10), 
                                                         timespan = cms.untracked.int32(60) 
                                                        ),
                        WARNING  =      cms.untracked.PSet (
                                                         limit = cms.untracked.int32(100),
                                                         timespan = cms.untracked.int32(60) 
                                                        ),                                                        
                        ERROR       = cms.untracked.PSet (
                                                         limit = cms.untracked.int32(100),
                                                         timespan = cms.untracked.int32(60) 
                                                        ),       
                       trkwarning  = cms.untracked.PSet (
                                                         limit = cms.untracked.int32(20),
                                                         timespan = cms.untracked.int32(1200) 
                                                        ),                                               
                        unimportant  = cms.untracked.PSet (
                                                         limit = cms.untracked.int32(5) 
                                                        ),        
                        serious_matter  = cms.untracked.PSet (
                                                         limit = cms.untracked.int32(1000000)
                                                        )                                                                  
       ),
       cerr           = cms.untracked.PSet(               
                       threshold = cms.untracked.string('WARNING')
       ),
       jobdebug>           = cms.untracked.PSet(
                                     default = cms.untracked.PSet(
                                                    limit = cms.untracked.int32(1000000) 
                                   )
        ),                                                                                                       
        anotherfile       = cms.untracked.PSet(
                                    serious_matter = cms.untracked.PSet(
                                                    limit = cms.untracked.int32(1000) 
                                    )
        ),
        default                   =  cms.untracked.PSet(
                                                     limit = cms.untracked.int32(10),
                                                     timespan = cms.untracked.int32(60) 
       )                                                  
)        
         
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10))
process.myAnalysisModule = cms.EDAnalyzer('ModuleThatIssuesMessages')
process.p = cms.Path(process.myAnalysisModule)

The configuration file can specify options for a given destination, via a PSet with that destination as its name. These options include setting thresholds for reacting to messages, setting limits of how many times this destination will react to a messages of a given type (either ID or severity).

It is completely optional to have a PSet configuring a given destination. For example, in this file, the cout destination is not further configured. In that case, no filtering will be done for that destination -- all messages will appear.

-- SudhirMalik - 30-Aug-2011


This topic: CMSPublic > CMSCommunicationsGroup > CMSCommunicationsProjects > WebHome > SWGuide > SWGuideFrameWork > SWGuideMessageLogger > SWGuideMessageLoggerSetupExamples > SWGuideMessageLoggerDestname
Topic revision: r2 - 2012-05-13 - NitishDhingra
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback