The log package

[Tags:benchmark, bsd3, library, test]

A library that provides a way to record structured log messages with multiple backends.

Supported backends:


[Skip to Readme]

Properties

Versions 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.3.0, 0.3.1, 0.4, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.6, 0.7, 0.8, 0.9.0.0, 0.9.0.1
Change log CHANGELOG.md
Dependencies base (<5), log-base (>=0.7.1.1 && <0.9), log-elasticsearch (>=0.9.0.1 && <0.10), log-postgres (>=0.7.0.1 && <0.9) [details]
License BSD3
Copyright Scrive AB
Author Scrive AB
Maintainer Andrzej Rybczak <andrzej@rybczak.net>, Jonathan Jouty <jonathan@scrive.com>, Mikhail Glushenkov <mikhail@scrive.com>, Oleg Grenrus <oleg.grenrus@iki.fi>
Category System
Home page https://github.com/scrive/log
Source repository head: git clone https://github.com/scrive/log.git
Uploaded Tue Jun 20 16:22:37 UTC 2017 by MikhailGlushenkov
Distributions LTSHaskell:0.7, NixOS:0.9.0.0, Stackage:0.9.0.1, Tumbleweed:0.7
Downloads 1616 total (69 in the last 30 days)
Votes
1 []
Status Docs available [build log]
Last success reported on 2017-06-20 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for log

Readme for log-0.9.0.1

log Hackage version Build Status

A library that provides a way to record structured log messages with multiple back ends.

Supported back ends:

  • Standard output
  • Elasticsearch
  • PostgreSQL

The log library provides Elasticsearch and PostgreSQL back ends. If you only need one of those, use log-base and log-elasticsearch or log-postgres.

Example

{-# LANGUAGE OverloadedStrings #-}

module Main where

import Log
import Log.Backend.ElasticSearch.V5

import System.Random

main :: IO ()
main = do
  let config = defaultElasticSearchConfig {
        esServer  = "http://localhost:9200",
        esIndex   = "logs",
        esMapping = "log"
        }
  withElasticSearchLogger config randomIO $ \logger ->
    runLogT "main" logger $ do
      logTrace_ "foo"