Maintainer | simons@cryp.to |
---|---|
Stability | provisional |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
A simple System.Logging.Facade back-end for syslog(3)
as specified in
POSIX.1-2008.
- syslogSink :: LogSink
- syslogSink' :: (Maybe Location -> String -> String) -> Maybe Facility -> LogSink
- showWithLocation :: Maybe Location -> String -> String
Documentation
syslogSink :: LogSink Source #
Pass this value to setLogSink
to switch
logging to syslog
. Messages of all priorities will be logged in the
processes' default syslog facility --- typically User
.
If these default settings don't fit your needs, consider using syslogSink
or call withSyslog
or a similar funtion to configure
the system's syslog
implementation appropriately.
syslogSink = syslogSink' showWithLocation Nothing
syslogSink' :: (Maybe Location -> String -> String) -> Maybe Facility -> LogSink Source #
A variant of syslogSink
that allows you to control how the location
information provided by logger-facade
is baked into the log message and
which syslog
Facility
will be used. If no explicit facility is set,
messages go out with whatever the process default is --- typically
User
.
showWithLocation :: Maybe Location -> String -> String Source #
The default message formatter used by syslogSink
. It will append the
location of the message to the string such that running
info "Hello, world."
yields:
May 15 10:59:41 myhost ghc[28074]: Hello, world. (from package "interactive", module "Ghci2", file "<interactive>", line 32, and column 1