C# Class log4net.ElasticSearch.Repository

Inheritance: IRepository
Mostra file Open project: jptoto/log4net.ElasticSearch Class Usage Examples

Public Methods

Method Description
Add ( IEnumerable logEvents, int bufferSize ) : void

Post the event(s) to the Elasticsearch API. If the bufferSize in the connection string is set to more than 1, assume we use the _bulk API for better speed and efficiency

Create ( string connectionString ) : IRepository
Create ( string connectionString, IHttpClient httpClient ) : IRepository

Private Methods

Method Description
Repository ( log4net.ElasticSearch.Models.Uri uri, IHttpClient httpClient ) : System.Collections.Generic

Method Details

Add() public method

Post the event(s) to the Elasticsearch API. If the bufferSize in the connection string is set to more than 1, assume we use the _bulk API for better speed and efficiency
public Add ( IEnumerable logEvents, int bufferSize ) : void
logEvents IEnumerable A collection of logEvents
bufferSize int The BufferSize as set in the connection string details
return void

Create() public static method

public static Create ( string connectionString ) : IRepository
connectionString string
return IRepository

Create() public static method

public static Create ( string connectionString, IHttpClient httpClient ) : IRepository
connectionString string
httpClient IHttpClient
return IRepository