/usr/share/doc/libghc-fast-logger-doc/html/System-Log-FastLogger.html is in libghc-fast-logger-doc 2.4.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | <!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.FastLogger</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_System-Log-FastLogger.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/System-Log-FastLogger.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">fast-logger-2.4.7: A fast logging system</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">System.Log.FastLogger</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Creating a logger set</a></li><li><a href="#g:2">Buffer size</a></li><li><a href="#g:3">Renewing and removing a logger set</a></li><li><a href="#g:4">Log messages</a></li><li><a href="#g:5">Writing a log message</a></li><li><a href="#g:6">Flushing buffered log messages</a></li><li><a href="#g:7">FastLogger</a></li><li><a href="#g:8">Date cache</a></li><li><a href="#g:9">File rotation</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module provides a fast logging system which
scales on multicore environments (i.e. +RTS -N<x>).</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">data</span> <a href="#t:LoggerSet">LoggerSet</a></li><li class="src short"><a href="#v:newFileLoggerSet">newFileLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a></li><li class="src short"><a href="#v:newStdoutLoggerSet">newStdoutLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a></li><li class="src short"><a href="#v:newStderrLoggerSet">newStderrLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a></li><li class="src short"><a href="#v:newLoggerSet">newLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:BufSize">BufSize</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:defaultBufSize">defaultBufSize</a> :: <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></li><li class="src short"><a href="#v:renewLoggerSet">renewLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:rmLoggerSet">rmLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><span class="keyword">data</span> <a href="#t:LogStr">LogStr</a></li><li class="src short"><span class="keyword">class</span> <a href="#t:ToLogStr">ToLogStr</a> msg <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><a href="#v:fromLogStr">fromLogStr</a> :: <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:logStrLength">logStrLength</a> :: <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:pushLogStr">pushLogStr</a> :: <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:pushLogStrLn">pushLogStrLn</a> :: <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:flushLogStr">flushLogStr</a> :: <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><span class="keyword">type</span> <a href="#t:FastLogger">FastLogger</a> = <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><span class="keyword">type</span> <a href="#t:TimedFastLogger">TimedFastLogger</a> = (<a href="System-Log-FastLogger-Date.html#t:FormattedTime">FormattedTime</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a>) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><span class="keyword">data</span> <a href="#t:LogType">LogType</a><ul class="subs"><li>= <a href="#v:LogNone">LogNone</a></li><li>| <a href="#v:LogStdout">LogStdout</a> <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></li><li>| <a href="#v:LogStderr">LogStderr</a> <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></li><li>| <a href="#v:LogFileNoRotate">LogFileNoRotate</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></li><li>| <a href="#v:LogFile">LogFile</a> <a href="System-Log-FastLogger-File.html#t:FileLogSpec">FileLogSpec</a> <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></li><li>| <a href="#v:LogCallback">LogCallback</a> (<a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ())</li></ul></li><li class="src short"><a href="#v:newFastLogger">newFastLogger</a> :: <a href="System-Log-FastLogger.html#t:LogType">LogType</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="System-Log-FastLogger.html#t:FastLogger">FastLogger</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ())</li><li class="src short"><a href="#v:withFastLogger">withFastLogger</a> :: <a href="System-Log-FastLogger.html#t:LogType">LogType</a> -> (<a href="System-Log-FastLogger.html#t:FastLogger">FastLogger</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:newTimedFastLogger">newTimedFastLogger</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger-Date.html#t:FormattedTime">FormattedTime</a> -> <a href="System-Log-FastLogger.html#t:LogType">LogType</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="System-Log-FastLogger.html#t:TimedFastLogger">TimedFastLogger</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ())</li><li class="src short"><a href="#v:withTimedFastLogger">withTimedFastLogger</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger-Date.html#t:FormattedTime">FormattedTime</a> -> <a href="System-Log-FastLogger.html#t:LogType">LogType</a> -> (<a href="System-Log-FastLogger.html#t:TimedFastLogger">TimedFastLogger</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a</li><li class="src short">module <a href="System-Log-FastLogger-Date.html">System.Log.FastLogger.Date</a></li><li class="src short">module <a href="System-Log-FastLogger-File.html">System.Log.FastLogger.File</a></li></ul></div><div id="interface"><h1 id="g:1">Creating a logger set</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:LoggerSet" class="def">LoggerSet</a> <a href="src/System-Log-FastLogger.html#LoggerSet" class="link">Source</a> <a href="#t:LoggerSet" class="selflink">#</a></p><div class="doc"><p>A set of loggers.
The number of loggers is the capabilities of GHC RTS.
You can specify it with "+RTS -N<x>".
A buffer is prepared for each capability.</p></div></div><div class="top"><p class="src"><a id="v:newFileLoggerSet" class="def">newFileLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> <a href="src/System-Log-FastLogger.html#newFileLoggerSet" class="link">Source</a> <a href="#v:newFileLoggerSet" class="selflink">#</a></p><div class="doc"><p>Creating a new <code><a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a></code> using a file.</p></div></div><div class="top"><p class="src"><a id="v:newStdoutLoggerSet" class="def">newStdoutLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> <a href="src/System-Log-FastLogger.html#newStdoutLoggerSet" class="link">Source</a> <a href="#v:newStdoutLoggerSet" class="selflink">#</a></p><div class="doc"><p>Creating a new <code><a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a></code> using stdout.</p></div></div><div class="top"><p class="src"><a id="v:newStderrLoggerSet" class="def">newStderrLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> <a href="src/System-Log-FastLogger.html#newStderrLoggerSet" class="link">Source</a> <a href="#v:newStderrLoggerSet" class="selflink">#</a></p><div class="doc"><p>Creating a new <code><a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a></code> using stderr.</p></div></div><div class="top"><p class="src"><a id="v:newLoggerSet" class="def">newLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> <a href="src/System-Log-FastLogger.html#newLoggerSet" class="link">Source</a> <a href="#v:newLoggerSet" class="selflink">#</a></p><div class="doc"><div class="warning"><p>Deprecated: Use newFileLoggerSet etc instead</p></div><p>Creating a new <code><a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a></code>.
If <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> is specified to the second argument,
stdout is used.
Please note that the minimum <code><a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></code> is 1.</p></div></div><h1 id="g:2">Buffer size</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:BufSize" class="def">BufSize</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="src/System-Log-FastLogger-IO.html#BufSize" class="link">Source</a> <a href="#t:BufSize" class="selflink">#</a></p><div class="doc"><p>The type for buffer size of each core.</p></div></div><div class="top"><p class="src"><a id="v:defaultBufSize" class="def">defaultBufSize</a> :: <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a> <a href="src/System-Log-FastLogger-IO.html#defaultBufSize" class="link">Source</a> <a href="#v:defaultBufSize" class="selflink">#</a></p><div class="doc"><p>The default buffer size (4,096 bytes).</p></div></div><h1 id="g:3">Renewing and removing a logger set</h1><div class="top"><p class="src"><a id="v:renewLoggerSet" class="def">renewLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-Log-FastLogger.html#renewLoggerSet" class="link">Source</a> <a href="#v:renewLoggerSet" class="selflink">#</a></p><div class="doc"><p>Renewing the internal file information in <code><a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a></code>.
This does nothing for stdout and stderr.</p></div></div><div class="top"><p class="src"><a id="v:rmLoggerSet" class="def">rmLoggerSet</a> :: <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-Log-FastLogger.html#rmLoggerSet" class="link">Source</a> <a href="#v:rmLoggerSet" class="selflink">#</a></p><div class="doc"><p>Flushing the buffers, closing the internal file information
and freeing the buffers.</p></div></div><h1 id="g:4">Log messages</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:LogStr" class="def">LogStr</a> <a href="src/System-Log-FastLogger-LogStr.html#LogStr" class="link">Source</a> <a href="#t:LogStr" class="selflink">#</a></p><div class="doc"><p>Log message builder. Use (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#v:-60--62-"><></a></code>) to append two LogStr in O(1).</p></div><div class="subs instances"><p id="control.i:LogStr" class="caption collapser" onclick="toggleSection('i:LogStr')">Instances</p><div id="section.i:LogStr" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:LogStr:IsString:1" class="instance expander" onclick="toggleSection('i:id:LogStr:IsString:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:IsString">IsString</a> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a></span> <a href="src/System-Log-FastLogger-LogStr.html#line-59" class="link">Source</a> <a href="#t:LogStr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:LogStr:IsString:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fromString">fromString</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="#v:fromString" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:LogStr:Monoid:2" class="instance expander" onclick="toggleSection('i:id:LogStr:Monoid:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a></span> <a href="src/System-Log-FastLogger-LogStr.html#line-55" class="link">Source</a> <a href="#t:LogStr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:LogStr:Monoid:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mempty">mempty</a> :: <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="#v:mempty" class="selflink">#</a></p><p class="src"><a href="#v:mappend">mappend</a> :: <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="#v:mappend" class="selflink">#</a></p><p class="src"><a href="#v:mconcat">mconcat</a> :: [<a href="System-Log-FastLogger.html#t:LogStr">LogStr</a>] -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="#v:mconcat" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:LogStr:ToLogStr:3" class="instance expander" onclick="toggleSection('i:id:LogStr:ToLogStr:3')"></span> <a href="System-Log-FastLogger.html#t:ToLogStr">ToLogStr</a> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a></span> <a href="src/System-Log-FastLogger-LogStr.html#line-65" class="link">Source</a> <a href="#t:LogStr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:LogStr:ToLogStr:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toLogStr">toLogStr</a> :: <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="src/System-Log-FastLogger-LogStr.html#toLogStr" class="link">Source</a> <a href="#v:toLogStr" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a id="t:ToLogStr" class="def">ToLogStr</a> msg <span class="keyword">where</span> <a href="src/System-Log-FastLogger-LogStr.html#ToLogStr" class="link">Source</a> <a href="#t:ToLogStr" class="selflink">#</a></p><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="System-Log-FastLogger.html#v:toLogStr">toLogStr</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:toLogStr" class="def">toLogStr</a> :: msg -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="src/System-Log-FastLogger-LogStr.html#toLogStr" class="link">Source</a> <a href="#v:toLogStr" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:ToLogStr" class="caption collapser" onclick="toggleSection('i:ToLogStr')">Instances</p><div id="section.i:ToLogStr" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:ToLogStr:ToLogStr:1" class="instance expander" onclick="toggleSection('i:ic:ToLogStr:ToLogStr:1')"></span> <a href="System-Log-FastLogger.html#t:ToLogStr">ToLogStr</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></span> <a href="src/System-Log-FastLogger-LogStr.html#line-71" class="link">Source</a> <a href="#t:ToLogStr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:ToLogStr:ToLogStr:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toLogStr">toLogStr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="src/System-Log-FastLogger-LogStr.html#toLogStr" class="link">Source</a> <a href="#v:toLogStr" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:ToLogStr:ToLogStr:2" class="instance expander" onclick="toggleSection('i:ic:ToLogStr:ToLogStr:2')"></span> <a href="System-Log-FastLogger.html#t:ToLogStr">ToLogStr</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></span> <a href="src/System-Log-FastLogger-LogStr.html#line-69" class="link">Source</a> <a href="#t:ToLogStr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:ToLogStr:ToLogStr:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toLogStr">toLogStr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="src/System-Log-FastLogger-LogStr.html#toLogStr" class="link">Source</a> <a href="#v:toLogStr" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:ToLogStr:ToLogStr:3" class="instance expander" onclick="toggleSection('i:ic:ToLogStr:ToLogStr:3')"></span> <a href="System-Log-FastLogger.html#t:ToLogStr">ToLogStr</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></span> <a href="src/System-Log-FastLogger-LogStr.html#line-67" class="link">Source</a> <a href="#t:ToLogStr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:ToLogStr:ToLogStr:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toLogStr">toLogStr</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="src/System-Log-FastLogger-LogStr.html#toLogStr" class="link">Source</a> <a href="#v:toLogStr" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:ToLogStr:ToLogStr:4" class="instance expander" onclick="toggleSection('i:ic:ToLogStr:ToLogStr:4')"></span> <a href="System-Log-FastLogger.html#t:ToLogStr">ToLogStr</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a></span> <a href="src/System-Log-FastLogger-LogStr.html#line-75" class="link">Source</a> <a href="#t:ToLogStr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:ToLogStr:ToLogStr:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toLogStr">toLogStr</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text-Lazy.html#t:Text">Text</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="src/System-Log-FastLogger-LogStr.html#toLogStr" class="link">Source</a> <a href="#v:toLogStr" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:ToLogStr:ToLogStr:5" class="instance expander" onclick="toggleSection('i:ic:ToLogStr:ToLogStr:5')"></span> <a href="System-Log-FastLogger.html#t:ToLogStr">ToLogStr</a> <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></span> <a href="src/System-Log-FastLogger-LogStr.html#line-73" class="link">Source</a> <a href="#t:ToLogStr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:ToLogStr:ToLogStr:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toLogStr">toLogStr</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="src/System-Log-FastLogger-LogStr.html#toLogStr" class="link">Source</a> <a href="#v:toLogStr" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:ToLogStr:ToLogStr:6" class="instance expander" onclick="toggleSection('i:ic:ToLogStr:ToLogStr:6')"></span> <a href="System-Log-FastLogger.html#t:ToLogStr">ToLogStr</a> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a></span> <a href="src/System-Log-FastLogger-LogStr.html#line-65" class="link">Source</a> <a href="#t:ToLogStr" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:ToLogStr:ToLogStr:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:toLogStr">toLogStr</a> :: <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> <a href="src/System-Log-FastLogger-LogStr.html#toLogStr" class="link">Source</a> <a href="#v:toLogStr" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:fromLogStr" class="def">fromLogStr</a> :: <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/System-Log-FastLogger-LogStr.html#fromLogStr" class="link">Source</a> <a href="#v:fromLogStr" class="selflink">#</a></p><div class="doc"><p>Converting <code><a href="System-Log-FastLogger.html#t:LogStr">LogStr</a></code> to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:logStrLength" class="def">logStrLength</a> :: <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="src/System-Log-FastLogger-LogStr.html#logStrLength" class="link">Source</a> <a href="#v:logStrLength" class="selflink">#</a></p><div class="doc"><p>Obtaining the length of <code><a href="System-Log-FastLogger.html#t:LogStr">LogStr</a></code>.</p></div></div><h1 id="g:5">Writing a log message</h1><div class="top"><p class="src"><a id="v:pushLogStr" class="def">pushLogStr</a> :: <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-Log-FastLogger.html#pushLogStr" class="link">Source</a> <a href="#v:pushLogStr" class="selflink">#</a></p><div class="doc"><p>Writing a log message to the corresponding buffer.
If the buffer becomes full, the log messages in the buffer
are written to its corresponding file, stdout, or stderr.</p></div></div><div class="top"><p class="src"><a id="v:pushLogStrLn" class="def">pushLogStrLn</a> :: <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-Log-FastLogger.html#pushLogStrLn" class="link">Source</a> <a href="#v:pushLogStrLn" class="selflink">#</a></p><div class="doc"><p>Same as <code><a href="System-Log-FastLogger.html#v:pushLogStr">pushLogStr</a></code> but also appends a newline.</p></div></div><h1 id="g:6">Flushing buffered log messages</h1><div class="top"><p class="src"><a id="v:flushLogStr" class="def">flushLogStr</a> :: <a href="System-Log-FastLogger.html#t:LoggerSet">LoggerSet</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-Log-FastLogger.html#flushLogStr" class="link">Source</a> <a href="#v:flushLogStr" class="selflink">#</a></p><div class="doc"><p>Flushing log messages in buffers.
This function must be called explicitly when the program is
being terminated.</p><p>Note: Since version 2.1.6, this function does not need to be
explicitly called, as every push includes an auto-debounced flush
courtesy of the auto-update package. Since version 2.2.2, this
function can be used to force flushing outside of the debounced
flush calls.</p></div></div><h1 id="g:7">FastLogger</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:FastLogger" class="def">FastLogger</a> = <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-Log-FastLogger.html#FastLogger" class="link">Source</a> <a href="#t:FastLogger" class="selflink">#</a></p><div class="doc"><p><code><a href="System-Log-FastLogger.html#t:FastLogger">FastLogger</a></code> simply log <code>logStr</code>.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:TimedFastLogger" class="def">TimedFastLogger</a> = (<a href="System-Log-FastLogger-Date.html#t:FormattedTime">FormattedTime</a> -> <a href="System-Log-FastLogger.html#t:LogStr">LogStr</a>) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> () <a href="src/System-Log-FastLogger.html#TimedFastLogger" class="link">Source</a> <a href="#t:TimedFastLogger" class="selflink">#</a></p><div class="doc"><p><code><a href="System-Log-FastLogger.html#t:TimedFastLogger">TimedFastLogger</a></code> pass <code><a href="System-Log-FastLogger-Date.html#t:FormattedTime">FormattedTime</a></code> to callback and simply log its result.
this can be used to customize how to log timestamp.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:LogType" class="def">LogType</a> <a href="src/System-Log-FastLogger.html#LogType" class="link">Source</a> <a href="#t:LogType" class="selflink">#</a></p><div class="doc"><p>Logger Type.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:LogNone" class="def">LogNone</a></td><td class="doc"><p>No logging.</p></td></tr><tr><td class="src"><a id="v:LogStdout" class="def">LogStdout</a> <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></td><td class="doc"><p>Logging to stdout.
<code><a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></code> is a buffer size</p></td></tr><tr><td class="src"><a id="v:LogStderr" class="def">LogStderr</a> <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></td><td class="doc"><p>Logging to stdout.
<code><a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></code> is a buffer size
for each capability.</p></td></tr><tr><td class="src"><a id="v:LogFileNoRotate" class="def">LogFileNoRotate</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:FilePath">FilePath</a> <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></td><td class="doc"><p>Logging to a file.
<code><a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></code> is a buffer size
for each capability.</p></td></tr><tr><td class="src"><a id="v:LogFile" class="def">LogFile</a> <a href="System-Log-FastLogger-File.html#t:FileLogSpec">FileLogSpec</a> <a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></td><td class="doc"><p>Logging to a file.
<code><a href="System-Log-FastLogger.html#t:BufSize">BufSize</a></code> is a buffer size
for each capability.
File rotation is done on-demand.</p></td></tr><tr><td class="src"><a id="v:LogCallback" class="def">LogCallback</a> (<a href="System-Log-FastLogger.html#t:LogStr">LogStr</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()) (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Logging with a log and flush action.
run flush after log each message.</p></td></tr></table></div></div><div class="top"><p class="src"><a id="v:newFastLogger" class="def">newFastLogger</a> :: <a href="System-Log-FastLogger.html#t:LogType">LogType</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="System-Log-FastLogger.html#t:FastLogger">FastLogger</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ()) <a href="src/System-Log-FastLogger.html#newFastLogger" class="link">Source</a> <a href="#v:newFastLogger" class="selflink">#</a></p><div class="doc"><p>Initialize a <code><a href="System-Log-FastLogger.html#t:FastLogger">FastLogger</a></code> without attaching timestamp
a tuple of logger and clean up action are returned.</p></div></div><div class="top"><p class="src"><a id="v:withFastLogger" class="def">withFastLogger</a> :: <a href="System-Log-FastLogger.html#t:LogType">LogType</a> -> (<a href="System-Log-FastLogger.html#t:FastLogger">FastLogger</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/System-Log-FastLogger.html#withFastLogger" class="link">Source</a> <a href="#v:withFastLogger" class="selflink">#</a></p><div class="doc"><p><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#v:bracket">bracket</a></code> version of <code><a href="System-Log-FastLogger.html#v:newFastLogger">newFastLogger</a></code></p></div></div><div class="top"><p class="src"><a id="v:newTimedFastLogger" class="def">newTimedFastLogger</a> <a href="src/System-Log-FastLogger.html#newTimedFastLogger" class="link">Source</a> <a href="#v:newTimedFastLogger" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger-Date.html#t:FormattedTime">FormattedTime</a></td><td class="doc"><p>How do we get <code><a href="System-Log-FastLogger-Date.html#t:FormattedTime">FormattedTime</a></code>?
<a href="System-Log-FastLogger-Date.html">System.Log.FastLogger.Date</a> provide cached formatted time.</p></td></tr><tr><td class="src">-> <a href="System-Log-FastLogger.html#t:LogType">LogType</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="System-Log-FastLogger.html#t:TimedFastLogger">TimedFastLogger</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Initialize a <code><a href="System-Log-FastLogger.html#t:FastLogger">FastLogger</a></code> with timestamp attached to each message.
a tuple of logger and clean up action are returned.</p></div></div><div class="top"><p class="src"><a id="v:withTimedFastLogger" class="def">withTimedFastLogger</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> <a href="System-Log-FastLogger-Date.html#t:FormattedTime">FormattedTime</a> -> <a href="System-Log-FastLogger.html#t:LogType">LogType</a> -> (<a href="System-Log-FastLogger.html#t:TimedFastLogger">TimedFastLogger</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a <a href="src/System-Log-FastLogger.html#withTimedFastLogger" class="link">Source</a> <a href="#v:withTimedFastLogger" class="selflink">#</a></p><div class="doc"><p><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#v:bracket">bracket</a></code> version of <code>newTimeFastLogger</code></p></div></div><h1 id="g:8">Date cache</h1><div class="top"><p class="src">module <a href="System-Log-FastLogger-Date.html">System.Log.FastLogger.Date</a></p></div><h1 id="g:9">File rotation</h1><div class="top"><p class="src">module <a href="System-Log-FastLogger-File.html">System.Log.FastLogger.File</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|