7

I want to setup a log aggregator. So far I'm leaning towards ElasticSearch/Kibana. In my apps I'm using Serilog, that currently writes to the Windows Event Log. How do I configure Serilog to send the logs to ElasticSearch instead?

john_mm
  • 91
  • 1
  • 4

1 Answers1

9

G'day! There are some details on the Serilog wiki with the following:

Install-Package Serilog.Sinks.ElasticSearch

then:

var log = new LoggerConfiguration()
    .WriteTo.ElasticSearch()
    .CreateLogger();
Nicholas Blumhardt
  • 30,271
  • 4
  • 90
  • 101
  • Thanks Nicholas! Do you work on Octopus Deploy also? I believe we have met IRL :) – john_mm Oct 31 '14 at 22:46
  • 1
    Hey John, just noticed your comment a couple of years late, sorry :-) ... Yes, that was me; I'm no longer at Octopus, but still working in the "DevOps" space. Thanks for saying g'day! – Nicholas Blumhardt Feb 25 '16 at 23:31
  • 1
    @NicholasBlumhardt, your comment made me feel warm inside (I'm not the person you replied to) – SiberianGuy Apr 19 '18 at 13:32