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

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2016-06-20 - LukasKreczko
    • 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-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback