| Portability | Posix |
|---|---|
| Stability | provisional |
| Maintainer | [email protected] |
| Safe Haskell | Safe-Inferred |
System.Posix.Syslog
Description
FFI bindings to Unix's syslog(3). Process this file
with hsc2hs to obtain a Haskell module.
- data Priority
- data Facility
- data Option
- withSyslog :: String -> [Option] -> Facility -> IO a -> IO a
- syslog :: Priority -> String -> IO ()
- useSyslog :: String -> IO a -> IO a
- safeMsg :: String -> String
- _closelog :: IO ()
- _openlog :: CString -> CInt -> CInt -> IO ()
- _setlogmask :: CInt -> IO CInt
- _syslog :: CInt -> CString -> IO ()
Marshaled Data Types
Log messages are prioritized.
Syslog distinguishes various system facilities. Most
applications should log in USER.
Constructors
| KERN | kernel messages |
| USER | user-level messages (default unless set otherwise) |
mail system | |
| DAEMON | system daemons |
| AUTH | security/authorization messages |
| SYSLOG | messages generated internally by syslogd |
| LPR | line printer subsystem |
| NEWS | network news subsystem |
| UUCP | UUCP subsystem |
| CRON | clock daemon |
| AUTHPRIV | security/authorization messages (effectively equals |
| FTP | ftp daemon (effectively equals |
| LOCAL0 | reserved for local use |
| LOCAL1 | reserved for local use |
| LOCAL2 | reserved for local use |
| LOCAL3 | reserved for local use |
| LOCAL4 | reserved for local use |
| LOCAL5 | reserved for local use |
| LOCAL6 | reserved for local use |
| LOCAL7 | reserved for local use |
Options for the syslog service. Set with withSyslog.
Haskell API to syslog
Helpers
Low-level C functions
_setlogmask :: CInt -> IO CIntSource