<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 8.6.8">
<title>MLtonSyslog</title>
<link rel="stylesheet" href="./asciidoc.css" type="text/css">
<link rel="stylesheet" href="./pygments.css" type="text/css">


<script type="text/javascript" src="./asciidoc.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
asciidoc.install();
/*]]>*/
</script>
<link rel="stylesheet" href="./mlton.css" type="text/css"/>
</head>
<body class="article">
<div id="banner">
<div id="banner-home">
<a href="./Home">MLton 20130715</a>
</div>
</div>
<div id="header">
<h1>MLtonSyslog</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="listingblock">
<div class="content"><div class="highlight"><pre><span class="k">signature</span><span class="w"> </span><span class="n">MLTON_SYSLOG</span><span class="w"> </span><span class="p">=</span><span class="w"></span>
<span class="w">   </span><span class="k">sig</span><span class="w"></span>
<span class="w">      </span><span class="k">type</span><span class="w"> </span><span class="n">openflag</span><span class="w"></span>

<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">CONS</span><span class="w">     </span><span class="p">:</span><span class="w"> </span><span class="n">openflag</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">NDELAY</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">openflag</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">NOWAIT</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">openflag</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">ODELAY</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">openflag</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">PERROR</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">openflag</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">PID</span><span class="w">      </span><span class="p">:</span><span class="w"> </span><span class="n">openflag</span><span class="w"></span>

<span class="w">      </span><span class="k">type</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>

<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">AUTHPRIV</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">CRON</span><span class="w">     </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">DAEMON</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">KERN</span><span class="w">     </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">LOCAL0</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">LOCAL1</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">LOCAL2</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">LOCAL3</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">LOCAL4</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">LOCAL5</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">LOCAL6</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">LOCAL7</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">LPR</span><span class="w">      </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">MAIL</span><span class="w">     </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">NEWS</span><span class="w">     </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">SYSLOG</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">USER</span><span class="w">     </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">UUCP</span><span class="w">     </span><span class="p">:</span><span class="w"> </span><span class="n">facility</span><span class="w"></span>

<span class="w">      </span><span class="k">type</span><span class="w"> </span><span class="n">loglevel</span><span class="w"></span>

<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">EMERG</span><span class="w">    </span><span class="p">:</span><span class="w"> </span><span class="n">loglevel</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">ALERT</span><span class="w">    </span><span class="p">:</span><span class="w"> </span><span class="n">loglevel</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">CRIT</span><span class="w">     </span><span class="p">:</span><span class="w"> </span><span class="n">loglevel</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">ERR</span><span class="w">      </span><span class="p">:</span><span class="w"> </span><span class="n">loglevel</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">WARNING</span><span class="w">  </span><span class="p">:</span><span class="w"> </span><span class="n">loglevel</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">NOTICE</span><span class="w">   </span><span class="p">:</span><span class="w"> </span><span class="n">loglevel</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">INFO</span><span class="w">     </span><span class="p">:</span><span class="w"> </span><span class="n">loglevel</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">DEBUG</span><span class="w">    </span><span class="p">:</span><span class="w"> </span><span class="n">loglevel</span><span class="w"></span>

<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">closelog</span><span class="p">:</span><span class="w"> </span><span class="n">unit</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="n">unit</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">log</span><span class="p">:</span><span class="w"> </span><span class="n">loglevel</span><span class="w"> </span><span class="n">*</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="n">unit</span><span class="w"></span>
<span class="w">      </span><span class="k">val</span><span class="w"> </span><span class="n">openlog</span><span class="p">:</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="n">*</span><span class="w"> </span><span class="n">openflag</span><span class="w"> </span><span class="n">list</span><span class="w"> </span><span class="n">*</span><span class="w"> </span><span class="n">facility</span><span class="w"> </span><span class="p">-&gt;</span><span class="w"> </span><span class="n">unit</span><span class="w"></span>
<span class="w">   </span><span class="k">end</span><span class="w"></span>
</pre></div></div></div>
<div class="paragraph"><p><span class="monospaced">MLton.Syslog</span> is a complete interface to the system logging
facilities.  See <span class="monospaced">man 3 syslog</span> for more details.</p></div>
<div class="ulist"><ul>
<li>
<p>
<span class="monospaced">closelog ()</span>
</p>
<div class="paragraph"><p>closes the connection to the system logger.</p></div>
</li>
<li>
<p>
<span class="monospaced">log (l, s)</span>
</p>
<div class="paragraph"><p>logs message <span class="monospaced">s</span> at a loglevel <span class="monospaced">l</span>.</p></div>
</li>
<li>
<p>
<span class="monospaced">openlog (name, flags, facility)</span>
</p>
<div class="paragraph"><p>opens a connection to the system logger. <span class="monospaced">name</span> will be prefixed to
each message, and is typically set to the program name.</p></div>
</li>
</ul></div>
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
</div>
<div id="footer-badges">
</div>
</div>
</body>
</html>
