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 a Destination to the cerr Stream
0005 </title>
0006
0007 <center>
0008 <h1> <img src="header-public.gif" align="center"> </h1>
0009
0010 <font color=red>
0011 <h1>CMS MessageLogger Service
0012 <br>
0013 Establishing a Destination to the <em>cerr</em> Stream</h1>
0014 </font>
0015 </center>
0016
0017
0018 <pre>
0019 process TEST = {
0020
0021 service = MessageLogger {
0022 vstring destinations = { "detailedInfo.txt"
0023 , "critical.txt"
0024 , "cout"
0025 , <font color=red>"cerr"</font>
0026 }
0027 PSet critical.txt = { string threshold = "ERROR" }
0028 PSet detailedInfo.txt = { string threshold = "INFO" }
0029 PSet <font color=red>cerr</font> = { string threshold = "WARNING" }
0030 }
0031
0032 untracked PSet maxEvents = {untracked int32 input = 5}
0033 path p = { myAnalysisModule }
0034 module myAnalysisModule = ModuleThatIssuesMessages { }
0035 source = EmptySource { }
0036 }
0037 </pre>
0038
0039 The <font color=red>{ ..., "cerr", ... }</font>
0040 in the list of destinations refers to message information streamed to
0041 <em>std::cout</em> rather than to a file named cerr.
0042 <p>
0043 It is
0044 possible for a message to be sent to cerr even though no such stream is listed
0045 in the configuration file, since any message sent before services are configured
0046 will go to a cerr destination. However, unless cerr appears in the configuration
0047 file as a destination, that destination will be turned off once the service has
0048 been configured.
0049
0050 <p>
0051 The MessageLogger service provides no way to create a destination writing to
0052 an ordinary file named cout or cerr.
0053
0054 <p><center>
0055 <img src="bar.gif"></center>
0056
0057 <p><center>
0058 <a href="http://www.uscms.org/SoftwareComputing/index.html">
0059 USCMS Software and Computing Home Page </a> -
0060 <a href="MessageLogger.html"> CMS MessageLogger Service Page </a> -
0061 <a href="parameters.html#example"> Configuration File </a>
0062 </center>
0063
0064 <p>
0065 <hr>
0066 <address><a href="mailto:mf@fnal.gov">Mark Fischler</a></address>
0067
0068 Last modified: November 29, 2005
0069
0070 </body>