Instances1LogHandler
LogHandler SyslogHandlerDefined in hslogger-1.3.2.0 · System.Log.Handler.Syslog
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulehslogger-1.3.2.0Haskell2010
Syslog handler for the Haskell Logging Framework
Written by John Goerzen, jgoerzen@complete.org
This module implements an interface to the Syslog service commonly found in Unix/Linux systems. This interface is primarily of interest to developers of servers, as Syslog does not typically display messages in an interactive fashion.
This module is written in pure Haskell and is capable of logging to a local or remote machine using the Syslog protocol.
You can create a new Syslog LogHandler by calling openlog.
More information on the Haskell Logging Framework can be found at System.Log.Logger. This module can also be used outside of the rest of that framework for those interested in that.
LogHandler SyslogHandlerDefined in hslogger-1.3.2.0 · System.Log.Handler.Syslogopenlog :: StringThe name of this program -- will be prepended to every log message
-> [Option]-> FacilityThe Facility value to pass to the syslog system for every message logged
-> PriorityMessages logged below this priority will be ignored. To include every message, set this to DEBUG.
-> IO SyslogHandlerReturns the new handler
Initialize the Syslog system using the local system's default interface, /dev/log. Will return a new LogHandler.
On Windows, instead of using /dev/log, this will attempt to send UDP messages to something listening on the syslog port (514) on localhost.
Use openlog_remote if you need more control.
openlog_local Initialize the Syslog system using an arbitrary Unix socket (FIFO).
Not supported under Windows.
openlog_remote :: FamilyUsually AF_INET or AF_INET6; see Network.Socket
-> HostNameRemote hostname. Some use localhost
-> PortNumber514 is the default for syslog
-> StringProgram name
-> [Option]-> FacilityFacility value
-> PriorityPriority limit
-> IO SyslogHandlerLog to a remote server via UDP.
openlog_generic :: SocketA datagram socket
-> SockAddrAddress for transmissions
-> SocketTypesocket connection mode (stream / datagram)
-> StringProgram name
-> [Option]-> FacilityFacility value
-> PriorityPriority limit
-> IO SyslogHandlerThe most powerful initialization mechanism. Takes an open datagram socket.
Facilities are used by the system to determine where messages are sent.
KERNKernel messages; you should likely never use this in your programs
USERGeneral userland messages. Use this if nothing else is appropriate
MAILE-Mail system
DAEMONDaemon (server process) messages
AUTHAuthentication or security messages
SYSLOGInternal syslog messages; you should likely never use this in your programs
LPRPrinter messages
NEWSUsenet news
UUCPUUCP messages
CRONCron messages
AUTHPRIVPrivate authentication messages
FTPFTP messages
LOCAL0LOCAL0 through LOCAL7 are reserved for you to customize as you wish
LOCAL1LOCAL2LOCAL3LOCAL4LOCAL5LOCAL6LOCAL7Options for openlog.