<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<BODY bgcolor="FFFFFF">
<title>
          CMS MessageLogger: Establishing a Destination to the cerr Stream
</title>

<center>
<h1> <img src="header-public.gif" align="center"> </h1>

<font color=red>
<h1>CMS MessageLogger Service
<br> 
Establishing a Destination to the <em>cerr</em> Stream</h1>
</font>
</center>


<pre>
process TEST = {

  service = MessageLogger {
    vstring destinations = {   "detailedInfo.txt"
                             , "critical.txt"
                             , "cout"
                             , <font color=red>"cerr"</font>
                                             }
    PSet critical.txt     = { string threshold = "ERROR"   }
    PSet detailedInfo.txt = { string threshold = "INFO"    } 
    PSet <font color=red>cerr</font>             = { string threshold = "WARNING" }
  }

  untracked PSet maxEvents = {untracked int32 input = 5}
  path p = { myAnalysisModule }
  module myAnalysisModule = ModuleThatIssuesMessages { }
  source = EmptySource { }
}
</pre>

The <font color=red>{ ..., "cerr", ... }</font> 
in the list of destinations refers to message information streamed to 
<em>std::cout</em> rather than to a file named cerr.  
<p>
It is 
possible for a message to be sent to cerr even though no such stream is listed
in the configuration file, since any message sent before services are configured
will go to a cerr destination.  However, unless cerr appears in the configuration
file as a destination, that destination will be turned off once the service has
been configured.

<p>
The MessageLogger service provides no way to create a destination writing to
an ordinary file named cout or cerr.

<p><center>
<img src="bar.gif"></center>

<p><center>
<a href="http://www.uscms.org/SoftwareComputing/index.html">
USCMS Software and Computing Home Page </a> - 
<a href="MessageLogger.html"> CMS MessageLogger Service Page </a> -
<a href="parameters.html#example"> Configuration File </a>
</center>

<p>
      <hr>
      <address><a href="mailto:mf@fnal.gov">Mark Fischler</a></address>
<!-- hhmts start -->
Last modified: November 29, 2005
<!-- hhmts end -->
</body>
