homepage: ''
changelog-type: markdown
hash: 126f328c9325c10998289378191dc69e55b5ffdc37a7845f2d0ee57f6f13392e
test-bench-deps:
  log-base: -any
  base: -any
  text: -any
  log-effectful: -any
  effectful-core: -any
  aeson: -any
maintainer: andrzej@rybczak.net
synopsis: Adaptation of the log library for the effectful ecosystem.
changelog: |
  # log-effectful-1.0.0.0 (2022-10-10)
  * Initial release.
basic-deps:
  log-base: '>=0.12.0.0'
  base: <5
  time: -any
  text: -any
  effectful-core: '>=1.0.0.0 && <3.0.0.0'
all-versions:
- 1.0.0.0
author: Andrzej Rybczak, Dominik Peteler
latest: 1.0.0.0
description-type: markdown
description: |
  # log-effectful

  [![Build Status](https://github.com/haskell-effectful/log-effectful/workflows/Haskell-CI/badge.svg?branch=master)](https://github.com/haskell-effectful/log-effectful/actions?query=branch%3Amaster)
  [![Hackage](https://img.shields.io/hackage/v/log-effectful.svg)](https://hackage.haskell.org/package/log-effectful)
  [![Dependencies](https://img.shields.io/hackage-deps/v/log-effectful.svg)](https://packdeps.haskellers.com/feed?needle=andrzej@rybczak.net)
  [![Stackage LTS](https://www.stackage.org/package/log-effectful/badge/lts)](https://www.stackage.org/lts/package/log-effectful)
  [![Stackage Nightly](https://www.stackage.org/package/log-effectful/badge/nightly)](https://www.stackage.org/nightly/package/log-effectful)

  Adaptation of the [log-base](https://hackage.haskell.org/package/log-base)
  library for the effectful ecosystem.

  ## Example

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

  ```haskell
  {-# 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"
  ```
license-name: BSD-3-Clause

Update from Hackage at 2022-10-10T11:42:31Z
Update from Hackage at 2022-10-10T11:42:31Z
