CMS MessageLogger Logger: Establishing Thresholds for Destinations

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 string threshold = "ERROR" (or "INFO" or "WARNING") parameter in the PSets configuring critical.txt, detailedInfo.txt, and cerr respectively, tells the destination to ignore all messages with severity below ERROR (or INFO or WARNING). Thus the destination writing critical.txt will ignore all messages issued using LogDegbug,

LogInfo, and LogWarning.

This parameter is optional; if it is not present, the destination will not filter out messages by their severity. We do not illustrate setting the threshold to DEBUG, because there is no lower severity; thus string threshold = "DEBUG" would be equivalent to omitting that parameter.

-- SudhirMalik - 30-Aug-2011

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2012-05-13 - 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