| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Log
Contents
Description
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 = ElasticSearchConfig {
esServer = "http://localhost:9200",
esIndex = "logs",
esMapping = "log"
}
withElasticSearchLogger config randomIO $ \logger -> do
runLogT "main" logger $ do
logTrace_ "foo"
Documentation
MonadLog type class of monads with logging capabilities.
module Log.Class
LogMessage and LogLevel data definitions.
module Log.Data
module Log.Logger
LogT monad transformer that adds logging capabilities to
the underlying monad.
module Log.Monad