CMS 3D CMS Logo

simplestMLexample_cfg.py
Go to the documentation of this file.
1 # simplestMLexample -- an example Configuration file for MessageLogger service:
2 
3 # This example sets up logging to a file, delivering all messages created by
4 # LogInfo, LogVerbatim,
5 # LogWarning, LogPrint,
6 # LogError, LogProblem, LogImportant
7 # LogSystem, and LogAbsolute
8 # but not messages created by LogDebug or LogTrace.
9 #
10 # cmsRun simplestMLexample_cfg.py produces simplestML.log.
11 
12 import FWCore.ParameterSet.Config as cms
13 
14 process = cms.Process("TEST")
15 
16 import FWCore.Framework.test.cmsExceptionsFatal_cff
17 process.options = FWCore.Framework.test.cmsExceptionsFatal_cff.options
18 
19 process.load("FWCore.MessageService.test.Services_cff")
20 
21 # Here is the configuration of the MessgeLogger Service:
22 
23 process.MessageLogger = cms.Service("MessageLogger",
24  destinations = cms.untracked.vstring('simplestML'),
25  simplestML = cms.untracked.PSet(
26  threshold = cms.untracked.string('INFO'),
27  )
28 )
29 
30 process.maxEvents = cms.untracked.PSet(
31  input = cms.untracked.int32(3)
32 )
33 
34 process.source = cms.Source("EmptySource")
35 
36 process.sendSomeMessages = cms.EDAnalyzer("MLexampleModule_1")
37 
38 process.p = cms.Path(process.sendSomeMessages)