1

I'm considering to use serilog for my app. We have .net core 2.1 app. Want to push application logs to splunk. So I've options where I can use Serilog.Sinks.Splunk and push logs WriteTo.EventCollector (specific index is configured in splunk) Another option is I can write logs to files using witeto.File and use forwarder logs can be available in splunk.

Configuration looks like


    Serilog.Core.Logger logger= new LoggerConfiguration()
        .MinimumLevel.Information()
        .WriteTo.EventCollector(<host>,<token> ,new CompactSplunkJsonFormatter())
        .CreateLogger();

In this regard need suggestion

  1. Which of the above approaches are better?
  2. Is there any performance difference of WriteTo.EventCollector Vs witeto.File in serilog?
  3. Can there be any performance impact if I use above configuration? Any more configuration can be used along with this for better performance?
winadi
  • 141
  • 1
  • 6

0 Answers0