File indexing completed on 2024-04-06 12:12:43
0001 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
0002 <BODY bgcolor="FFFFFF">
0003 <title>
0004 CMS MessageLogger: Establishing File and Stream Destinations
0005 </title>
0006
0007 <center>
0008 <h1> <img src="header-public.gif" align="center"> </h1>
0009
0010 <font color=red>
0011 <h1>Establishing File and Stream Destinations</h1>
0012 </font>
0013 </center>
0014
0015 <pre>
0016 process TEST = {
0017
0018 service = MessageLogger {
0019 <font color=red>vstring destinations = { "detailedInfo.txt"
0020 , "critical.txt"
0021 , "jobdebug.txt"
0022 , "anotherfile.txt"
0023 , "cout"
0024 , "cerr"
0025 }</font>
0026 vstring categories = { "unimportant"
0027 , "trkwarning"
0028 , "serious_matter"
0029 }
0030 PSet critical.txt = { string threshold = "ERROR"
0031 PSet default = { int32 limit = 10
0032 int32 timespan = 180
0033 }
0034 PSet serious_matter = { int32 limit = 100000 }
0035 }
0036 PSet detailedInfo.txt = { string threshold = "INFO"
0037 PSet default = { int32 limit = 10
0038 int32 timespan = 60
0039 }
0040 PSet WARNING = { int32 limit = 100
0041 int32 timespan = 60
0042 }
0043 PSet ERROR = { int32 limit = 100
0044 int32 timespan = 60
0045 }
0046 PSet trkwarning = { int32 limit = 20
0047 int32 timespan = 1200
0048 }
0049 PSet unimportant = { int32 limit = 5 }
0050 PSet serious_matter = { int32 limit = 1000000 }
0051 }
0052 PSet cerr = { string threshold = "WARNING" }
0053
0054 PSet jobdebug.txt = { PSet default = { int32 limit = 1000000 }
0055 }
0056 PSet anotherfile.txt = { PSet serious_matter = { int32 limit = 1000 }
0057 }
0058 PSet default = { int32 limit = 10
0059 int32 timespan = 60
0060 }
0061 }
0062
0063 untracked PSet maxEvents = {untracked int32 input = 10}
0064 path p = { myAnalysisModule }
0065 module myAnalysisModule = ModuleThatIssuesMessages { }
0066 source = EmptySource { }
0067 }
0068 </pre>
0069
0070
0071 The <font color=red>vstring destinations = </font> {"detailedInfo.txt", ... }
0072 parameter establishes one or more file (or ostream) destinations for the
0073 messages issued. The destinations can be configured individually to establish
0074 filtering of messages. Since this is a <em> vstring</em> parameter, the
0075 names of the destinations are separated by commas.
0076 <p>
0077 In this case, we have specified four files (perhaps overkill in ordinary
0078 circumstances, but we wished to use the four illustrate various configuration
0079 options). We have also specified both cerr and cout; if this is done,
0080 it is recommended that cout be re-directed to a file, otherwise the message
0081 contents will be inter-mixed with those sent to cerr.
0082 <p>
0083 If messages are issued prior to the initiation of the MessageLogger service,
0084 the configuration of these destinations will not yet have occurred. Such
0085 messages will be sent to cerr alone.
0086
0087 <p><center>
0088 <img src="bar.gif"></center>
0089
0090 <p><center>
0091 <a href="http://www.uscms.org/SoftwareComputing/index.html">
0092 USCMS Software and Computing Home Page </a> -
0093 <a href="MessageLogger.html"> CMS MessageLogger Service Page </a> -
0094 <a href="parameters.html#complete"> Configuration File </a>
0095 </center>
0096
0097 <p>
0098 <hr>
0099 <address><a href="mailto:mf@fnal.gov">Mark Fischler</a></address>
0100
0101 Last modified: Dec 1, 2005
0102
0103 </body>
0104
0105
0106
0107
0108
0109
0110
0111