HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehslogger-1.3.2.0Haskell2010

System.Log.Handler.Syslog

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.

  • 3 types
  • 4 values
  • Packagehslogger-1.3.2.0
  • Exports7
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceSyslog.hs

Handler Initialization

1 declaration
valueopenlog
  1. :: String

    The name of this program -- will be prepended to every log message

  2. -> [Option]

    A list of Options. The list [] is perfectly valid. [PID] is probably most common here.

  3. -> Facility

    The Facility value to pass to the syslog system for every message logged

  4. -> Priority

    Messages logged below this priority will be ignored. To include every message, set this to DEBUG.

  5. -> IO SyslogHandler

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

Advanced handler initialization

3 declarations

Data Types

2 declarations
datadata Facility
#

Facilities are used by the system to determine where messages are sent.

Constructors

  • KERN

    Kernel messages; you should likely never use this in your programs

  • USER

    General userland messages. Use this if nothing else is appropriate

  • MAIL

    E-Mail system

  • DAEMON

    Daemon (server process) messages

  • AUTH

    Authentication or security messages

  • SYSLOG

    Internal syslog messages; you should likely never use this in your programs

  • LPR

    Printer messages

  • NEWS

    Usenet news

  • UUCP

    UUCP messages

  • CRON

    Cron messages

  • AUTHPRIV

    Private authentication messages

  • FTP

    FTP messages

  • LOCAL0

    LOCAL0 through LOCAL7 are reserved for you to customize as you wish

  • LOCAL1
  • LOCAL2
  • LOCAL3
  • LOCAL4
  • LOCAL5
  • LOCAL6
  • LOCAL7
Instances3Eq, Read, Show
  • Eq FacilityDefined in hslogger-1.3.2.0 · System.Log.Handler.Syslog
  • Read FacilityDefined in hslogger-1.3.2.0 · System.Log.Handler.Syslog
  • Show FacilityDefined in hslogger-1.3.2.0 · System.Log.Handler.Syslog
datadata Option
#

Options for openlog.

Constructors

  • PID

    Automatically log process ID (PID) with each message

  • PERROR

    Send a copy of each message to stderr

Instances3Eq, Read, Show
  • Eq OptionDefined in hslogger-1.3.2.0 · System.Log.Handler.Syslog
  • Read OptionDefined in hslogger-1.3.2.0 · System.Log.Handler.Syslog
  • Show OptionDefined in hslogger-1.3.2.0 · System.Log.Handler.Syslog