<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<BODY bgcolor="FFFFFF">
<title>
          CMS MessageLogger: Overall Default Limits and Timespans
</title>

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

<font color=red>
<h1> 
Overall Default Limits and Timespans</h1>
</font>
</center>

<pre>
process TEST = {

  service = MessageLogger {
    vstring destinations = { "detailedInfo.txt"
			   , "critical.txt"
			   , "jobdebug.txt"
			   , "anotherfile.txt"
			   , <font color=blue>"cout"</font>
			   , "cerr"
			   }
    vstring categories = { "unimportant"
			 , "trkwarning"
 			 , "serious_matter"
                         }
    PSet critical.txt = { string threshold = "ERROR"
                               PSet default = { int32 limit    = 10
			                       int32 timespan = 180
					      }
			      PSet serious_matter = { int32 limit = 100000 }
                        }
    PSet detailedInfo.txt = { string threshold = "INFO"
			      PSet default        = { int32 limit    =  10
					              int32 timespan =  60
					            }
			      PSet WARNING        = { int32 limit    = 100
			                              int32 timespan =  60 
					            }
			      PSet ERROR          = { int32 limit    = 100
			                              int32 timespan =  60 
					            }
			      PSet trkwarning     = { int32 limit    = 20
			                              int32 timespan = 1200
						    }
			      PSet unimportant    = { int32 limit    = 5 }
			      PSet serious_matter = { int32 limit    = 1000000 }
                            }
    <font color=blue>PSet cerr</font>     = { string threshold = "WARNING" }

    PSet jobdebug.txt =     { PSet default        = { int32 limit    = 1000000 }
                        }
    <font color=blue>PSet anotherfile.txt</font> =  { PSet serious_matter = { int32 limit    = 1000 } 
                            }
    <font color=red>PSet default = { int32 limit    = 10
                     int32 timespan = 60
		   }</font>
  }
  untracked PSet maxEvents = {untracked int32 input = 10}
  path p = { myAnalysisModule }
  module myAnalysisModule = ModuleThatIssuesMessages { }
  source = EmptySource { }
}
</pre>

The <font color=red>PSet default = { ... }</font> parameter, outside the context of any destination,
applies to all destinations for which no default limit and timespan are established.  This Pset specifies
that those destinations should behave as if their default limit and timespan are the given values.
<p>
In this example file, the limit of 10 reports of each type of message, and the timespan of 60 seconds,
would apply as defaults for cerr, anotherfile.txt, and cout, none of which contain a default in their
configuration PSets.  (cout in fact has no configuration Pset at all.)
<p>
Although in this illustration the <font color=red>PSet default = { ... }</font> parameter appears last,
it could validly appear first or in any other place within the  <font color=red>service = MessageLogger</font>
block but outside any <font color=red>PSet</font> <em>destination</em> block.



<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#complete"> Configuration File </a>
</center>

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








