System.Log

hslogger-1.3.1.1: Versatile logging framework

Copyright | Copyright (C) 2004-2011 John Goerzen
License | BSD3
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

System.Log

Contents

- Types

Description

Haskell Logging Framework

Written by John Goerzen, jgoerzen@complete.org

This module defines basic types used for logging.

Extensive documentation is available in System.Log.Logger.

Synopsis

- data Priority
  - = DEBUG
  - | INFO
  - | NOTICE
  - | WARNING
  - | ERROR
  - | CRITICAL
  - | ALERT
  - | EMERGENCY
- type LogRecord = (Priority, String)

# Types

data Priority #

Priorities are used to define how important a log message is. Users can filter log messages based on priorities.

These have their roots on the traditional syslog system. The standard definitions are given below, but you are free to interpret them however you like. They are listed here in ascending importance order.

Constructors

DEBUG | Debug messages
INFO | Information
NOTICE | Normal runtime conditions
WARNING | General Warnings
ERROR | General Errors
CRITICAL | Severe situations
ALERT | Take immediate action
EMERGENCY | System is unusable

#### Instances

Instances details

NFData Priority # | Since: 1.3.1.0
Instance details Defined in System.Log Methods rnf :: Priority -> () #
Data Priority # |
Instance details Defined in System.Log Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Priority -> c Priority # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Priority # toConstr :: Priority -> Constr # dataTypeOf :: Priority -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Priority) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Priority) # gmapT :: (forall b. Data b => b -> b) -> Priority -> Priority # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Priority -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Priority -> r # gmapQ :: (forall d. Data d => d -> u) -> Priority -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Priority -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Priority -> m Priority # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Priority -> m Priority # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Priority -> m Priority #
Bounded Priority # |
Instance details Defined in System.Log Methods minBound :: Priority # maxBound :: Priority #
Enum Priority # |
Instance details Defined in System.Log Methods succ :: Priority -> Priority # pred :: Priority -> Priority # toEnum :: Int -> Priority # fromEnum :: Priority -> Int # enumFrom :: Priority -> [Priority] # enumFromThen :: Priority -> Priority -> [Priority] # enumFromTo :: Priority -> Priority -> [Priority] # enumFromThenTo :: Priority -> Priority -> Priority -> [Priority] #
Generic Priority # |
Instance details Defined in System.Log Associated Types
type Rep Priority |
Instance details Defined in System.Log type Rep Priority = D1 ('MetaData "Priority" "System.Log" "hslogger-1.3.1.1-KsAN5sGrPFZ9CbteYFerm1" 'False) (((C1 ('MetaCons "DEBUG" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "INFO" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NOTICE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WARNING" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ERROR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CRITICAL" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ALERT" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EMERGENCY" 'PrefixI 'False) (U1 :: Type -> Type))))
Methods from :: Priority -> Rep Priority x # to :: Rep Priority x -> Priority #
Read Priority # |
Instance details Defined in System.Log Methods readsPrec :: Int -> ReadS Priority # readList :: ReadS [Priority] # readPrec :: ReadPrec Priority # readListPrec :: ReadPrec [Priority] #
Show Priority # |
Instance details Defined in System.Log Methods showsPrec :: Int -> Priority -> ShowS # show :: Priority -> String # showList :: [Priority] -> ShowS #
Eq Priority # |
Instance details Defined in System.Log Methods (==) :: Priority -> Priority -> Bool # (/=) :: Priority -> Priority -> Bool #
Ord Priority # |
Instance details Defined in System.Log Methods compare :: Priority -> Priority -> Ordering # (<) :: Priority -> Priority -> Bool # (<=) :: Priority -> Priority -> Bool # (>) :: Priority -> Priority -> Bool # (>=) :: Priority -> Priority -> Bool # max :: Priority -> Priority -> Priority # min :: Priority -> Priority -> Priority #
type Rep Priority # |
Instance details Defined in System.Log type Rep Priority = D1 ('MetaData "Priority" "System.Log" "hslogger-1.3.1.1-KsAN5sGrPFZ9CbteYFerm1" 'False) (((C1 ('MetaCons "DEBUG" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "INFO" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NOTICE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WARNING" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ERROR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CRITICAL" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ALERT" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EMERGENCY" 'PrefixI 'False) (U1 :: Type -> Type))))

type LogRecord = (Priority, String) #

Internal type of log records