Safe Haskell | None |
---|
Provide convenience functions for logging to the HSLogger "root" logger.
Documentation
:: Priority | The priority at and above which to log messages. |
-> Maybe FilePath | Path to the log file (optional) |
-> Bool | Log to syslog? |
-> IO () |
Set up the logging. All logs are handled by the global "root"
logger provided by HSLogger. We remove all of its handlers so that
it does nothing; then we conditionally add back two handlers -- one
for syslog, and one for a normal file -- dependent upon the
syslog
and log_file
arguments.
If syslog
is False
and log_file
is Nothing
; then nothing
will be logged and the log_level
will essentially be ignored
(even though the root logger will have its level set).
log_warning :: String -> IO ()Source
Log a message at the WARNING
level.