CMS MessageLogger Service: Establishing File and Stream Destinations

import FWCore.ParameterSet.Config as cms
process = cms.Process("MessageLoggerExample")
process.MessageLogger = cms.Service("MessageLogger",
       destinations   = cms.untracked.vstring(
       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(200)
process.myAnalysisModule = cms.EDAnalyzer('ModuleThatIssuesMessages')
process.p = cms.Path(process.myAnalysisModule)

The destinations = {"detailedInfo", ... } parameter establishes one or more file (or ostream) destinations for the messages issued. The destinations can be configured individually to establish filtering of messages.

If messages are issued prior to the initiation of the MessageLogger service, the configuration of these destinations will not yet have occurred. Such messages will be sent to cerr.

-- SudhirMalik - 30-Aug-2011

This topic: CMSPublic > CMSCommunicationsGroup > CMSCommunicationsProjects > WebHome > SWGuide > SWGuideFrameWork > SWGuideMessageLogger > SWGuideMessageLoggerSetupExamples > SWGuideMessageLoggerFiles
Topic revision: r6 - 2016-06-20 - LukasKreczko
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback