|
| System.Posix.Syslog | | Portability | Posix | | Stability | provisional | | Maintainer | simons@cryp.to |
|
|
|
|
|
| Description |
| FFI bindings to Unix's syslog(3). Process this file
with hsc2hs to obtain a Haskell module.
|
|
| Synopsis |
|
|
|
|
| Marshaled Data Types
|
|
|
| Log messages are prioritized.
| | Constructors | | Emergency | 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 | |
|
|
|
| Syslog distinguishes various system facilities. Most
applications should log in USER.
| | Constructors | | KERN | kernel messages
| | USER | user-level messages (default unless set otherwise)
| | MAIL | 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 (private)
| | FTP | ftp daemon
| | 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
|
| Instances | |
|
|
|
| Options for the syslog service. Set with withSyslog.
| | Constructors | | PID | log the pid with each message
| | CONS | log on the console if errors in sending
| | ODELAY | delay open until first syslog() (default)
| | NDELAY | don't delay open
| | NOWAIT | don't wait for console forks: DEPRECATED
| | PERROR | log to stderr as well
|
| Instances | |
|
|
| Haskell API to syslog
|
|
|
Bracket an IO computation between calls to _openlog
and _closelog. Since these settings are for the
process, multiple calls to this function will,
unfortunately, overwrite each other.
Example:
main = withSyslog "my-ident" [PID, PERROR] USER $ do
putStrLn "huhu"
syslog Debug "huhu"
|
|
|
| Log a message with the given priority.
|
|
| Helpers
|
|
|
| useSyslog ident = withSyslog ident [PID, PERROR] USER
|
|
|
| Escape any occurances of '%' in a string, so that it
is safe to pass it to _syslog. The syslog wrapper
does this automatically.
|
|
| Low-level C functions
|
|
|
|
|
|
|
|
|
|
| Produced by Haddock version 2.1.0 |