HORIZON HASKELLDocslts/ghc-9.14.x7a6c33e2026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · 7a6c33e · 2026-10-12

Modulelog-base-0.12.1.0Haskell2010

Log.Internal.Logger

The Logger type - implementation details.

Synopsis
  • Packagelog-base-0.12.1.0
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceLogger.hs
datadata Logger

An object used for communication with a logger thread that outputs LogMessages using e.g. PostgreSQL, Elasticsearch or stdout (depending on the back-end chosen).

Constructors

  • Logger
    • loggerWriteMessage :: !LogMessage -> IO ()

      Output a LogMessage.

    • loggerWaitForWrite :: !IO ()

      Wait for the logger to output all messages in its input queue (in the case logging is done asynchronously).

    • loggerShutdown :: !IO ()

      Kill the logger thread. Subsequent attempts to write messages to the logger will raise an exception.

Instances2Semigroup, Monoid
valuewithLogger :: Logger -> (Logger -> IO r) -> IO r

bracket-like execution of an IO action, verifying all messages are properly logged. See mkBulkLogger.