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

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