log-effectful: Adaptation of the log library for the effectful ecosystem.

[ bsd3, library, system ] [ Propose Tags ]

Adaptation of the log-base library for the effectful ecosystem.

[Skip to Readme]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS]
Change log CHANGELOG.md
Dependencies base (<5), effectful-core (>= && <, log-base (>=, text, time [details]
License BSD-3-Clause
Author Andrzej Rybczak, Dominik Peteler
Maintainer andrzej@rybczak.net
Category System
Bug tracker https://github.com/haskell-effectful/log-effectful/issues
Source repo head: git clone https://github.com/haskell-effectful/log-effectful
Uploaded by arybczak at 2022-10-10T11:30:36Z
Distributions NixOS:
Downloads 333 total (16 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-10-10 [all 1 reports]

Readme for log-effectful-

[back to package description]


Build Status Hackage Dependencies Stackage LTS Stackage Nightly

Adaptation of the log-base library for the effectful ecosystem.


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

{-# LANGUAGE OverloadedStrings #-}
module Main where

import Effectful
import Effectful.Log
import Log.Backend.ElasticSearch
import Log.Backend.StandardOutput

main :: IO ()
main = runEff $ do
  let config = defaultElasticSearchConfig
        { esServer = "http://localhost:9200"
        , esIndex  = "logs"
  withStdOutLogger $ \stdoutLogger -> do
    withElasticSearchLogger config $ \esLogger -> do
      runLog "main" (stdoutLogger <> esLogger) defaultLogLevel $ do
        logInfo_ "Hi there"