This project contains Semantic Logging Application Block (SLAB) sinks to persist application events published to ETW and consumed by SLAB.
Sinks
A sink to write Semantic Logging Application Block (SLAB) events to Elasticsearch.
Create a class derived from EventSource
You could also use EventSourceProxy
Install-Package EnterpriseLibrary.SemanticLogging.Elasticsearch
var listener = new ObservableEventListener();
listener.EnableEvents(CommonEventSource.Log, EventLevel.LogAlways, ~EventKeywords.None);
listener.LogToElasticsearch(
Environment.MachineName,
"http://localhost:9200",
"slab",
"mylogs");