hsyslog-5.0.2: FFI interface to syslog(3) from POSIX.1-2001

Maintainer | simons@cryp.to
Stability | provisional
Portability | POSIX
Safe Haskell | Safe-Inferred
Language | Haskell2010

System.Posix.Syslog.Priority

Contents

- Message Priorities

Description

FFI bindings to `syslog(3)` from POSIX.1-2008. This module is intended for purposes of low-level implementation. Users of this library should prefer safer and more convenient API provided by System.Posix.Syslog.

Synopsis

- data Priority
  - = Emergency
  - | Alert
  - | Critical
  - | Error
  - | Warning
  - | Notice
  - | Info
  - | Debug
- fromPriority :: Priority -> CInt

# Message Priorities

data Priority Source #

Log messages are prioritized with one of the following levels:

    >>> [minBound..maxBound] :: [Priority]
    [Emergency,Alert,Critical,Error,Warning,Notice,Info,Debug]

The `Ord` instance for `Priority` considers the more urgent level lower than less urgent ones:

    >>> Emergency < Debug
    True
    >>> minimum [minBound..maxBound] :: Priority
    Emergency
    >>> maximum [minBound..maxBound] :: Priority
    Debug

Constructors

Emergency | the system is unusable
Alert | action must be taken immediately
Critical | critical conditions
Error | error conditions
Warning | warning conditions
Notice | normal but significant condition
Info | informational
Debug | debug-level messages

#### Instances

Instances details

Bounded Priority Source # |
Instance details Defined in System.Posix.Syslog.Priority Methods minBound :: Priority Source # maxBound :: Priority Source #
Enum Priority Source # |

Instance details

Defined in System.Posix.Syslog.Priority

Methods

succ :: Priority -> Priority Source #

pred :: Priority -> Priority Source #

toEnum :: Int -> Priority Source #

fromEnum :: Priority -> Int Source #

enumFrom :: Priority -> [Priority] Source #

enumFromThen :: Priority -> Priority -> [Priority] Source #

enumFromTo :: Priority -> Priority -> [Priority] Source #

enumFromThenTo :: Priority -> Priority -> Priority -> [Priority] Source #

Generic Priority Source # |

Instance details

Defined in System.Posix.Syslog.Priority

Associated Types

type Rep Priority |

Instance details

Defined in System.Posix.Syslog.Priority

type Rep Priority = D1 ('MetaData "Priority" "System.Posix.Syslog.Priority" "hsyslog-5.0.2-Hnt0v7yqj5d9K5twuzR8kb" 'False) (((C1 ('MetaCons "Emergency" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Alert" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Critical" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Error" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Warning" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Notice" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: Priority -> Rep Priority x Source #

to :: Rep Priority x -> Priority Source #

Read Priority Source # |
Instance details Defined in System.Posix.Syslog.Priority Methods readsPrec :: Int -> ReadS Priority Source # readList :: ReadS [Priority] Source # readPrec :: ReadPrec Priority Source # readListPrec :: ReadPrec [Priority] Source #
Show Priority Source # |
Instance details Defined in System.Posix.Syslog.Priority Methods showsPrec :: Int -> Priority -> ShowS Source # show :: Priority -> String Source # showList :: [Priority] -> ShowS Source #
Eq Priority Source # |
Instance details Defined in System.Posix.Syslog.Priority Methods (==) :: Priority -> Priority -> Bool Source # (/=) :: Priority -> Priority -> Bool Source #
Ord Priority Source # |
Instance details Defined in System.Posix.Syslog.Priority Methods compare :: Priority -> Priority -> Ordering Source # (<) :: Priority -> Priority -> Bool Source # (<=) :: Priority -> Priority -> Bool Source # (>) :: Priority -> Priority -> Bool Source # (>=) :: Priority -> Priority -> Bool Source # max :: Priority -> Priority -> Priority Source # min :: Priority -> Priority -> Priority Source #
type Rep Priority Source # |

Instance details

Defined in System.Posix.Syslog.Priority

type Rep Priority = D1 ('MetaData "Priority" "System.Posix.Syslog.Priority" "hsyslog-5.0.2-Hnt0v7yqj5d9K5twuzR8kb" 'False) (((C1 ('MetaCons "Emergency" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Alert" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Critical" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Error" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Warning" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Notice" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type))))

fromPriority :: Priority -> CInt Source #

Translate a `Priority` into the system-dependent identifier that's used by the `syslog(3)` implementation.