Safe Haskell | None |
---|---|
Language | Haskell2010 |
Elasticsearch logging back-end.
Synopsis
- data ElasticSearchConfig
- esServer :: ElasticSearchConfig -> Text
- esIndex :: ElasticSearchConfig -> Text
- esShardCount :: ElasticSearchConfig -> Int
- esReplicaCount :: ElasticSearchConfig -> Int
- esMapping :: ElasticSearchConfig -> Text
- esLogin :: ElasticSearchConfig -> Maybe (EsUsername, EsPassword)
- esLoginInsecure :: ElasticSearchConfig -> Bool
- checkElasticSearchLogin :: ElasticSearchConfig -> IO (Either IOException ())
- checkElasticSearchConnection :: ElasticSearchConfig -> IO (Either HttpException ())
- defaultElasticSearchConfig :: ElasticSearchConfig
- withElasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> (Logger -> IO r) -> IO r
- elasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> IO Logger
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 # | |
Defined in Log.Backend.ElasticSearch.V1.Internal (==) :: ElasticSearchConfig -> ElasticSearchConfig -> Bool # (/=) :: ElasticSearchConfig -> ElasticSearchConfig -> Bool # | |
Show ElasticSearchConfig Source # | |
Defined in Log.Backend.ElasticSearch.V1.Internal showsPrec :: Int -> ElasticSearchConfig -> ShowS # show :: ElasticSearchConfig -> String # showList :: [ElasticSearchConfig] -> ShowS # |
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.
esLogin :: ElasticSearchConfig -> Maybe (EsUsername, EsPassword) Source #
Elasticsearch basic authentication username and password.
esLoginInsecure :: ElasticSearchConfig -> Bool Source #
Allow basic authentication over non-TLS connections.
checkElasticSearchLogin :: ElasticSearchConfig -> IO (Either IOException ()) 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
defaultElasticSearchConfig :: ElasticSearchConfig Source #
Sensible defaults for ElasticSearchConfig
.
withElasticSearchLogger :: ElasticSearchConfig -> IO Word32 -> (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.
:: ElasticSearchConfig | Configuration. |
-> IO Word32 | Generate a random 32-bit word for use in document IDs. |
-> 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
).