CMS MessageLogger Service: Setting Limits By Severity Level

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)

Each destination can (in addition to limits by message ID) be configured to react to only some limited number of messages of a specified severity level. For example, detailedInfo.txt would react to only the first 100 messages issued via edm::LogWarning(...), and the first 100 issued via edm::LogError(...), with exponential backoff thereafter. (Typically, one might limit the number of INFO or WARNING messages and let all the ERROR messages emerge.) The way to do this to place, in the PSet for the destination, a PSet WARNING (or INFO or ERROR or DEBUG) containing the limit and timespan for messages of that severity which do not otherwise have a limit set by category.

Limits set by specific category, if present, will take precedence over limits for the severity.

A message can be ignored because the limit for that severity is exceeded, or because the limit for that ID is exceeded.

Establishing limits by severity level is always optional.

-- SudhirMalik - 30-Aug-2011

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2012-05-14 - NitishDhingra
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

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