name:                log
version:             0.8
synopsis:            Structured logging solution with multiple backends

description:         A library that provides a way to record structured
                     log messages with multiple backends.
                     .
                     Supported backends:
                     .
                     * standard output
                     .
                     * Elasticsearch
                     .
                     * PostgreSQL

homepage:            https://github.com/scrive/log
license:             BSD3
license-file:        LICENSE
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>
copyright:           Scrive AB
category:            System
build-type:          Simple
cabal-version:       >=1.10
tested-with:         GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1

Source-repository head
  Type:     git
  Location: https://github.com/scrive/log.git

library
  exposed-modules:     Log,
                       Log.Backend.ElasticSearch,
                       Log.Backend.ElasticSearch.Internal,
                       Log.Backend.ElasticSearch.Lens,
                       Log.Backend.PostgreSQL,
                       Log.Backend.StandardOutput,
                       Log.Backend.StandardOutput.Bulk,
                       Log.Backend.Text,
                       Log.Class,
                       Log.Data,
                       Log.Internal.Logger,
                       Log.Logger,
                       Log.Monad

  build-depends:       base <5,
                       log-base >= 0.7,
                       log-elasticsearch >= 0.8,
                       log-postgres >= 0.7

  hs-source-dirs:      src

  ghc-options:         -O2 -Wall -funbox-strict-fields

  default-language:   Haskell2010
  default-extensions: PackageImports

test-suite log-test
  type:               exitcode-stdio-1.0
  build-depends:      aeson,
                      base,
                      bloodhound,
                      bytestring,
                      http-client,
                      http-types,
                      log,
                      random,
                      tasty,
                      tasty-hunit,
                      time,
                      text
  hs-source-dirs:     test
  main-is:            Test.hs
  other-modules:      Test.ElasticSearch
  ghc-options:        -Wall -threaded
  default-language:   Haskell2010
  default-extensions: BangPatterns
                    , OverloadedStrings
                    , RecordWildCards

test-suite log-test-integration
  type:               exitcode-stdio-1.0
  build-depends:      aeson,
                      base,
                      bloodhound,
                      bytestring,
                      exceptions,
                      http-client,
                      http-types,
                      log,
                      process,
                      random,
                      tasty,
                      tasty-hunit,
                      time,
                      text,
                      transformers
  hs-source-dirs:     test
  main-is:            IntegrationTest.hs
  other-modules:      Test.ElasticSearch
  ghc-options:        -Wall -threaded
  default-language:   Haskell2010
  default-extensions: BangPatterns
                    , OverloadedStrings
                    , RecordWildCards