HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulelog-base-0.12.0.1Haskell2010

Log

Structured logging solution with multiple backends.

{-# LANGUAGE OverloadedStrings #-}

module Main where

import Log
import Log.Backend.ElasticSearch

import System.Random

main :: IO ()
main = do
  let config = Log.Backend.ElasticSearch.ElasticSearchConfig {
        esServer  = "http://localhost:9200",
        esIndex   = "logs",
        esMapping = "log"
        }
  Log.Backend.ElasticSearch.withElasticSearchLogger config randomIO $ \logger -> do
    runLogT "main" logger defaultLogLevel $ do
      logTrace_ "foo"
  • 1 value

Documentation

0 declarations

MonadLog type class of monads with logging capabilities.

module Log.Class

LogMessage and LogLevel data definitions.

module Log.Data

Logger objects used to perform logging operations in LogT.

module Log.Logger

LogT monad transformer that adds logging capabilities to the underlying monad.

module Log.Monad

Aeson re-exports

2 declarations
valueobject :: [Pair] -> Value
#

Create a Value from a list of name/value Pairs. If duplicate keys arise, later keys and their associated values win.