HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulelog-base-0.12.1.0Haskell2010

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"
Contents
  1. Documentation
  2. Aeson re-exports
Synopsis

Documentation

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

valueobject :: [Pair] -> Value

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