HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulesnap-server-1.1.2.1Haskell2010

System.FastLogger

  • 1 type
  • 8 values
datadata Logger
#

Holds the state for a logger.

valuenewLogger
  1. :: FilePath

    log file to use

  2. -> IO Logger
#

Creates a new logger, logging to the given file. If the file argument is "-", then log to stdout; if it's "stderr" then we log to stderr, otherwise we log to a regular file in append mode. The file is closed and re-opened every 15 minutes to facilitate external log rotation.

valuewithLogger
  1. :: FilePath

    log file to use

  2. -> (Logger -> IO a)
  3. -> IO a
#

Creates a Logger and passes it into the given function, cleaning up with "stopLogger" afterwards.

valuestopLogger :: Logger -> IO ()
#

Kills a logger thread, causing any unwritten contents to be flushed out to disk

valuelogMsg :: Logger -> ByteString -> IO ()
#

Sends out a log message verbatim with a newline appended. Note: if you want a fancy log message you'll have to format it yourself (or use combinedLogEntry).