Files
dotfiles/cabal/share/doc/x86_64-osx-ghc-7.10.1/hslogger-1.2.8/html/System-Log-Handler.html
2015-04-05 17:47:08 +02:00

11 lines
7.0 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>System.Log.Handler</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_System-Log-Handler.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hslogger-1.2.8: Versatile logging framework</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>Copyright (C) 2004-2011 John Goerzen</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>John Goerzen &lt;jgoerzen@complete.org&gt; </td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">System.Log.Handler</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Basic Types</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Definition of log handler support</p><p>For some handlers, check out <a href="System-Log-Handler-Simple.html">System.Log.Handler.Simple</a> and
<a href="System-Log-Handler-Syslog.html">System.Log.Handler.Syslog</a>.</p><p>Please see <a href="System-Log-Logger.html">System.Log.Logger</a> for extensive documentation on the
logging system.</p><p>Written by John Goerzen, jgoerzen@complete.org</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> <a href="#t:LogHandler">LogHandler</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:setLevel">setLevel</a> :: a -&gt; <a href="System-Log.html#t:Priority">Priority</a> -&gt; a</li><li><a href="#v:getLevel">getLevel</a> :: a -&gt; <a href="System-Log.html#t:Priority">Priority</a></li><li><a href="#v:setFormatter">setFormatter</a> :: a -&gt; <a href="System-Log-Formatter.html#t:LogFormatter">LogFormatter</a> a -&gt; a</li><li><a href="#v:getFormatter">getFormatter</a> :: a -&gt; <a href="System-Log-Formatter.html#t:LogFormatter">LogFormatter</a> a</li><li><a href="#v:handle">handle</a> :: a -&gt; <a href="System-Log.html#t:LogRecord">LogRecord</a> -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/System-IO.html#t:IO">IO</a> ()</li><li><a href="#v:emit">emit</a> :: a -&gt; <a href="System-Log.html#t:LogRecord">LogRecord</a> -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/System-IO.html#t:IO">IO</a> ()</li><li><a href="#v:close">close</a> :: a -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/System-IO.html#t:IO">IO</a> ()</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Basic Types</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:LogHandler" class="def">LogHandler</a> a <span class="keyword">where</span></p><div class="doc"><p>All log handlers should adhere to this. </p><p>This is the base class for the various log handlers. They should
all adhere to this class. </p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="System-Log-Handler.html#v:setLevel">setLevel</a>, <a href="System-Log-Handler.html#v:getLevel">getLevel</a>, <a href="System-Log-Handler.html#v:setFormatter">setFormatter</a>, <a href="System-Log-Handler.html#v:emit">emit</a>, <a href="System-Log-Handler.html#v:close">close</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:setLevel" class="def">setLevel</a> :: a -&gt; <a href="System-Log.html#t:Priority">Priority</a> -&gt; a</p><div class="doc"><p>Sets the log level. <code><a href="System-Log-Handler.html#v:handle">handle</a></code> will drop
items beneath this level.</p></div><p class="src"><a name="v:getLevel" class="def">getLevel</a> :: a -&gt; <a href="System-Log.html#t:Priority">Priority</a></p><div class="doc"><p>Gets the current level.</p></div><p class="src"><a name="v:setFormatter" class="def">setFormatter</a> :: a -&gt; <a href="System-Log-Formatter.html#t:LogFormatter">LogFormatter</a> a -&gt; a</p><div class="doc"><p>Set a log formatter to customize the log format for this Handler</p></div><p class="src"><a name="v:getFormatter" class="def">getFormatter</a> :: a -&gt; <a href="System-Log-Formatter.html#t:LogFormatter">LogFormatter</a> a</p><p class="src"><a name="v:handle" class="def">handle</a> :: a -&gt; <a href="System-Log.html#t:LogRecord">LogRecord</a> -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Logs an event if it meets the requirements
given by the most recent call to <code><a href="System-Log-Handler.html#v:setLevel">setLevel</a></code>.</p></div><p class="src"><a name="v:emit" class="def">emit</a> :: a -&gt; <a href="System-Log.html#t:LogRecord">LogRecord</a> -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Forces an event to be logged regardless of
the configured level.</p></div><p class="src"><a name="v:close" class="def">close</a> :: a -&gt; <a href="file:///usr/local/Cellar/ghc/7.10.1/share/doc/ghc/html/libraries/base-4.8.0.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p>Closes the logging system, causing it to close
any open files, etc.</p></div></div><div class="subs instances"><p id="control.i:LogHandler" class="caption collapser" onclick="toggleSection('i:LogHandler')">Instances</p><div id="section.i:LogHandler" class="show"><table><tr><td class="src"><a href="System-Log-Handler.html#t:LogHandler">LogHandler</a> (<a href="System-Log-Handler-Simple.html#t:GenericHandler">GenericHandler</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.0</p></div></body></html>