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.Options

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 Option
  - = LogPID
  - | Console
  - | DelayedOpen
  - | ImmediateOpen
  - | DontWaitForChildren
- fromOption :: Option -> CInt

# Documentation

data Option Source #

The function `openlog` allows one to configure a handful of process-wide options that modify the behavior of the `syslog` function. These options are `pid`, `cons`, `odelay`, and `ndelay`.

Constructors

LogPID | Log the pid with each message.
Console | Log on the console if errors occur while sending messages.
DelayedOpen | Delay all initialization until first `syslog()` call (default).
ImmediateOpen | Initialize the syslog system immediately.
DontWaitForChildren | The syslog system should not attempt to wait for child process it may have created. This option is required by applications who enable `SIGCHLD` themselves.

#### Instances

Instances details

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

Instance details

Defined in System.Posix.Syslog.Options

Methods

succ :: Option -> Option Source #

pred :: Option -> Option Source #

toEnum :: Int -> Option Source #

fromEnum :: Option -> Int Source #

enumFrom :: Option -> [Option] Source #

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

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

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

Generic Option Source # |

Instance details

Defined in System.Posix.Syslog.Options

Associated Types

type Rep Option |

Instance details

Defined in System.Posix.Syslog.Options

type Rep Option = D1 ('MetaData "Option" "System.Posix.Syslog.Options" "hsyslog-5.0.2-Hnt0v7yqj5d9K5twuzR8kb" 'False) ((C1 ('MetaCons "LogPID" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Console" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DelayedOpen" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ImmediateOpen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DontWaitForChildren" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: Option -> Rep Option x Source #

to :: Rep Option x -> Option Source #

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

Instance details

Defined in System.Posix.Syslog.Options

type Rep Option = D1 ('MetaData "Option" "System.Posix.Syslog.Options" "hsyslog-5.0.2-Hnt0v7yqj5d9K5twuzR8kb" 'False) ((C1 ('MetaCons "LogPID" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Console" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DelayedOpen" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ImmediateOpen" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DontWaitForChildren" 'PrefixI 'False) (U1 :: Type -> Type))))

fromOption :: Option -> CInt Source #

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