CMS MessageLogger: Setting a Destination's Threshold
import FWCore.ParameterSet.Config as cms
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger = cms.Service("MessageLogger",
destinations = cms.untracked.vstring(
'detailedInfo'
,'critical'
,'cout'
,'cerr'
),
critical = cms.untracked.PSet(
threshold = cms.untracked.string('ERROR')
),
detailedInfo = cms.untracked.PSet(
threshold = cms.untracked.string('INFO')
),
cerr = cms.untracked.PSet(
threshold = cms.untracked.string('WARNING')
)
)
# set the number of events
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(5)
)
process.myAnalysisModule = cms.EDAnalyzer('ModuleThatIssuesMessages')
process.p = cms.Path(process.myAnalysisModule)
The
string threshold = "ERROR" parameter
in the PSet configuring
critical.txt tells the
destination producing the file critical.txt to ignore all messages
with severity below
ERROR. Thus, messages
issued using
LogDebug,
edm::LogInfo, or
edm::LogWarning will have no effect on
the file critical.txt.
This destination will, however, react to messages issued using
edm::LogError.
--
SudhirMalik - 30-Aug-2011