log-elasticsearch-0.11.0.0: Structured logging solution (Elasticsearch back end)

Safe HaskellNone
LanguageHaskell2010

Log.Backend.ElasticSearch

Description

Elasticsearch logging back-end.

Synopsis

Documentation

data ElasticSearchConfig Source #

Configuration for the Elasticsearch Logger. See https://www.elastic.co/guide/en/elasticsearch/reference/current/glossary.html for the explanation of terms.

Instances
Eq ElasticSearchConfig Source # 
Instance details

Defined in Log.Backend.ElasticSearch.Internal

Show ElasticSearchConfig Source # 
Instance details

Defined in Log.Backend.ElasticSearch.Internal

Generic ElasticSearchConfig Source # 
Instance details

Defined in Log.Backend.ElasticSearch.Internal

Associated Types

type Rep ElasticSearchConfig :: Type -> Type #

type Rep ElasticSearchConfig Source # 
Instance details

Defined in Log.Backend.ElasticSearch.Internal

type Rep ElasticSearchConfig = D1 (MetaData "ElasticSearchConfig" "Log.Backend.ElasticSearch.Internal" "log-elasticsearch-0.11.0.0-83gOSAGjoIuJ97hGawziW6" False) (C1 (MetaCons "ElasticSearchConfig" PrefixI True) ((S1 (MetaSel (Just "esServer") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: (S1 (MetaSel (Just "esIndex") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "esShardCount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))) :*: ((S1 (MetaSel (Just "esReplicaCount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Just "esMapping") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) :*: (S1 (MetaSel (Just "esLogin") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Text, Text))) :*: S1 (MetaSel (Just "esLoginInsecure") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool)))))

esServer :: ElasticSearchConfig -> Text Source #

Elasticsearch server address.

esIndex :: ElasticSearchConfig -> Text Source #

Elasticsearch index name.

esShardCount :: ElasticSearchConfig -> Int Source #

Elasticsearch shard count for the named index.

Since: 0.10.0.0

esReplicaCount :: ElasticSearchConfig -> Int Source #

Elasticsearch replica count for the named index.

Since: 0.10.0.0

esMapping :: ElasticSearchConfig -> Text Source #

Elasticsearch mapping name (unused with ES >= 7.0.0)

esLogin :: ElasticSearchConfig -> Maybe (Text, Text) Source #

Elasticsearch basic authentication username and password.

esLoginInsecure :: ElasticSearchConfig -> Bool Source #

Allow basic authentication over non-TLS connections.

checkElasticSearchLogin :: ElasticSearchConfig -> IO () Source #

Check that login credentials are specified properly.

Since: 0.10.0.0

checkElasticSearchConnection :: ElasticSearchConfig -> IO (Either HttpException ()) Source #

Check that we can connect to the ES server.

Since: 0.10.0.0

withElasticSearchLogger :: ElasticSearchConfig -> (Logger -> IO r) -> IO r Source #

Create an elasticSearchLogger for the duration of the given action, and shut it down afterwards, making sure that all buffered messages are actually written to the Elasticsearch store.

elasticSearchLogger Source #

Arguments

:: ElasticSearchConfig

Configuration.

-> IO Logger 

Deprecated: Use withElasticSearchLogger instead!

Start an asynchronous logger thread that stores messages using Elasticsearch.

Please use withElasticSearchLogger instead, which is more exception-safe (see the note attached to mkBulkLogger).