htsn-common-0.0.2: Display/logging facilities used by both htsn and htsn-import.

Safe HaskellNone



Provide convenience functions for logging to the HSLogger "root" logger.





:: 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_debug :: String -> IO ()Source

Log a message at the DEBUG level.

log_error :: String -> IO ()Source

Log a message at the ERROR level.

log_info :: String -> IO ()Source

Log a message at the INFO level.

log_warning :: String -> IO ()Source

Log a message at the WARNING level.