CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/FWCore/MessageLogger/examples/simplestMLexample_cfg.py

Go to the documentation of this file.
00001 # simplestMLexample -- an example Configuration file for MessageLogger service:
00002 
00003 # This example sets up logging to a file, delivering all messages created by
00004 # LogInfo, LogVerbatim,
00005 # LogWarning, LogPrint,
00006 # LogError, LogProblem, LogImportant
00007 # LogSystem, and LogAbsolute
00008 # but not messages created by LogDebug or LogTrace.
00009 #
00010 # cmsRun simplestMLexample_cfg.py produces simplestML.log.
00011 
00012 import FWCore.ParameterSet.Config as cms
00013 
00014 process = cms.Process("TEST")
00015 
00016 import FWCore.Framework.test.cmsExceptionsFatal_cff
00017 process.options = FWCore.Framework.test.cmsExceptionsFatal_cff.options
00018 
00019 process.load("FWCore.MessageService.test.Services_cff")
00020 
00021 # Here is the configuration of the MessgeLogger Service:
00022 
00023 process.MessageLogger = cms.Service("MessageLogger",
00024     destinations = cms.untracked.vstring('simplestML'),
00025     simplestML = cms.untracked.PSet(
00026         threshold = cms.untracked.string('INFO'),
00027     )
00028 )
00029 
00030 process.maxEvents = cms.untracked.PSet(
00031     input = cms.untracked.int32(3)
00032 )
00033 
00034 process.source = cms.Source("EmptySource")
00035 
00036 process.sendSomeMessages = cms.EDAnalyzer("MLexampleModule_1")
00037 
00038 process.p = cms.Path(process.sendSomeMessages)