CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  cerr = cms.untracked.PSet(
25  enable = cms.untracked.bool(False)
26  ),
27  files = cms.untracked.PSet(
28  simplestML = cms.untracked.PSet(
29  threshold = cms.untracked.string('INFO')
30  )
31  )
32 )
33 
34 process.maxEvents = cms.untracked.PSet(
35  input = cms.untracked.int32(3)
36 )
37 
38 process.source = cms.Source("EmptySource")
39 
40 process.sendSomeMessages = cms.EDAnalyzer("MLexampleModule_1")
41 
42 process.p = cms.Path(process.sendSomeMessages)