Skip to content

Repository files navigation

log

Hackage versionBuild Status

A set of libraries that provide a way to record structured log messages with multiple backends.

Supported backends:

Example

A sample usage for logging to both standard output and Elasticsearch:

{-# LANGUAGE OverloadedStrings #-}
moduleMainwhereimportLogimportLog.Backend.ElasticSearchimportLog.Backend.StandardOutputmain::IO()
main =dolet config = defaultElasticSearchConfig
{ esServer ="http://localhost:9200"
, esIndex ="logs"
}
withStdOutLogger $\stdoutLogger ->do
withElasticSearchLogger config $\esLogger ->do
runLogT "main" (stdoutLogger <> esLogger) defaultLogLevel $do
logInfo_ "Hi there"

About

Structured logging solution.

Topics

Resources

Stars

38 stars

Watchers

29 watching

Forks

Releases

Packages

Used by

Contributors

Languages