Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 75797b29a03e71d63c5c2fd46422a606 > files > 59

ghc-hslogger-devel-1.1.0-3.fc14.i686.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->
<title>src/System/Log.hs</title>
<link type='text/css' rel='stylesheet' href='hscolour.css' />
</head>
<body>
<pre><a name="line-1"></a><span class='hs-comment'>{- arch-tag: Logging Main Definition
<a name="line-2"></a>Copyright (C) 2004 John Goerzen &lt;jgoerzen@complete.org&gt;
<a name="line-3"></a>
<a name="line-4"></a>This program is free software; you can redistribute it and/or modify
<a name="line-5"></a>it under the terms of the GNU Lesser General Public License as published by
<a name="line-6"></a>the Free Software Foundation; either version 2.1 of the License, or
<a name="line-7"></a>(at your option) any later version.
<a name="line-8"></a>
<a name="line-9"></a>This program is distributed in the hope that it will be useful,
<a name="line-10"></a>but WITHOUT ANY WARRANTY; without even the implied warranty of
<a name="line-11"></a>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
<a name="line-12"></a>GNU Lesser General Public License for more details.
<a name="line-13"></a>
<a name="line-14"></a>You should have received a copy of the GNU Lesser General Public License
<a name="line-15"></a>along with this program; if not, write to the Free Software
<a name="line-16"></a>Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
<a name="line-17"></a>-}</span>
<a name="line-18"></a>
<a name="line-19"></a><span class='hs-comment'>{- |
<a name="line-20"></a>   Module     : System.Log
<a name="line-21"></a>   Copyright  : Copyright (C) 2004 John Goerzen
<a name="line-22"></a>   License    : GNU LGPL, version 2.1 or above
<a name="line-23"></a>
<a name="line-24"></a>   Maintainer : John Goerzen &lt;jgoerzen@complete.org&gt; 
<a name="line-25"></a>   Stability  : experimental
<a name="line-26"></a>   Portability: portable
<a name="line-27"></a>
<a name="line-28"></a>Haskell Logging Framework
<a name="line-29"></a>
<a name="line-30"></a>Written by John Goerzen, jgoerzen\@complete.org
<a name="line-31"></a>
<a name="line-32"></a>This module defines basic types used for logging.
<a name="line-33"></a>
<a name="line-34"></a>Extensive documentation is available in
<a name="line-35"></a>"System.Log.Logger".
<a name="line-36"></a>
<a name="line-37"></a>-}</span>
<a name="line-38"></a>
<a name="line-39"></a>
<a name="line-40"></a>
<a name="line-41"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>System</span><span class='hs-varop'>.</span><span class='hs-conid'>Log</span><span class='hs-layout'>(</span><span class='hs-comment'>-- * Types</span>
<a name="line-42"></a>                        <span class='hs-conid'>Priority</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span><span class='hs-layout'>,</span>
<a name="line-43"></a>                        <span class='hs-conid'>LogRecord</span>
<a name="line-44"></a><span class='hs-layout'>)</span>
<a name="line-45"></a>
<a name="line-46"></a>    <span class='hs-keyword'>where</span>
<a name="line-47"></a>
<a name="line-48"></a><span class='hs-comment'>{- | Priorities are used to define how important a log messgae is.
<a name="line-49"></a>Users can filter log messages based on priorities.
<a name="line-50"></a>
<a name="line-51"></a>These have their roots on the traditional syslog system.  The standard
<a name="line-52"></a>definitions are given below, but you are free to interpret them however you
<a name="line-53"></a>like.  They are listed here in ascending importance order.
<a name="line-54"></a>-}</span>
<a name="line-55"></a>
<a name="line-56"></a><a name="Priority"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>Priority</span> <span class='hs-keyglyph'>=</span> 
<a name="line-57"></a>            <span class='hs-conid'>DEBUG</span>                   <span class='hs-comment'>-- ^ Debug messages</span>
<a name="line-58"></a>          <span class='hs-keyglyph'>|</span> <span class='hs-conid'>INFO</span>                    <span class='hs-comment'>-- ^ Information</span>
<a name="line-59"></a>          <span class='hs-keyglyph'>|</span> <span class='hs-conid'>NOTICE</span>                  <span class='hs-comment'>-- ^ Normal runtime conditions</span>
<a name="line-60"></a>          <span class='hs-keyglyph'>|</span> <span class='hs-conid'>WARNING</span>                 <span class='hs-comment'>-- ^ General Warnings</span>
<a name="line-61"></a>          <span class='hs-keyglyph'>|</span> <span class='hs-conid'>ERROR</span>                   <span class='hs-comment'>-- ^ General Errors</span>
<a name="line-62"></a>          <span class='hs-keyglyph'>|</span> <span class='hs-conid'>CRITICAL</span>                <span class='hs-comment'>-- ^ Severe situations</span>
<a name="line-63"></a>          <span class='hs-keyglyph'>|</span> <span class='hs-conid'>ALERT</span>                   <span class='hs-comment'>-- ^ Take immediate action</span>
<a name="line-64"></a>          <span class='hs-keyglyph'>|</span> <span class='hs-conid'>EMERGENCY</span>               <span class='hs-comment'>-- ^ System is unusable</span>
<a name="line-65"></a>                    <span class='hs-keyword'>deriving</span> <span class='hs-layout'>(</span><span class='hs-conid'>Eq</span><span class='hs-layout'>,</span> <span class='hs-conid'>Ord</span><span class='hs-layout'>,</span> <span class='hs-conid'>Show</span><span class='hs-layout'>,</span> <span class='hs-conid'>Read</span><span class='hs-layout'>)</span>
<a name="line-66"></a>
<a name="line-67"></a><span class='hs-comment'>{- | Internal type of log records -}</span>
<a name="line-68"></a>
<a name="line-69"></a><a name="LogRecord"></a><span class='hs-keyword'>type</span> <span class='hs-conid'>LogRecord</span> <span class='hs-keyglyph'>=</span> <span class='hs-layout'>(</span><span class='hs-conid'>Priority</span><span class='hs-layout'>,</span> <span class='hs-conid'>String</span><span class='hs-layout'>)</span>
<a name="line-70"></a>
</pre></body>
</html>