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 Pset entries int32 limit = ... and int32 timespan = ... establish that this destination should report only so many messages of a specified specified messageID or severity level. For example, detailedInfo.txt will report only the first twenty trkwarning messages, before ignoring most of the rest (with an exponential backoff).
The timespan, if supplied, directs the destination to reset its count of how many times a message of this type has been encountered if no messages of this type occur within that many seconds. For example, if this job issues 25 trkwarning messages at the start, then 25 additional messages more than 20 minutes (1200 seconds) later, the first twenty of each group would be reported. A limit can be supplied without a timespan. Supplying a timespan without a limit is meaningless.
These are optional. Each destination can supply limit and timespan for all, some, or none of severity levels, listed message IDs, and default (all message IDs without explicit specification). Note that if both the limit and the timespan are specified, they are not comma-separated (since they are two distinct elements in a PSet).
-- SudhirMalik - 30-Aug-2011