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

The LogT monad transformer for adding logging capabilities to any monad.

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

Instances2Semigroup, Monoid
newtypenewtype LogT (m :: Type -> Type) a

Monad transformer that adds logging capabilities to the underlying monad.

Constructors

Instances23MonadTrans, MonadTransControl, MFunctor, MonadError, MonadReader, MonadState, …
valuerunLogT
  1. :: Text

    Application component name to use.

  2. -> Logger

    The logging back-end to use.

  3. -> LogLevel

    The maximum log level allowed to be logged. Only messages less or equal than this level with be logged.

  4. -> LogT m a

    The LogT computation to run.

  5. -> m a

Run a LogT computation.

Note that in the case of asynchronous/bulk loggers runLogT doesn't guarantee that all messages are actually written to the log once it finishes. Use withPGLogger or withElasticSearchLogger for that.