Lurgle.Logging now supports Splunk!

Lurgle.Logging until now has supported just the File, Windows Event Log, Seq, and Console log types. It was always the intent to extend this to other log types to support the overall intent of Lurgle - accelerating and enhancing structured logging in your projects by leveraging the excellent work of the Serilog community.

I hadn't got around to adding Splunk, because Seq fulfilled our needs for structured logging. I love Seq, but if you already have Splunk, you can readily send structured logs here via a HTTP Event Collector configured for Json. If you had both, you could send to both simultaneously!

This is really a straightforward addition. All it really took was to set up a Splunk instance on my machine for testing, and a small amount of code.

To make use of Splunk as a log type is just as easy. If you're using app.config, you can simply specify;

<add key="LogSplunkHost" value="https://splunk.domain.com/services/collector" />
<add key="LogSplunkToken" value="yourtokenhere" />

and of course via a constructor:

Logging.SetConfig(new LoggingConfig(Logging.Config, logSplunkHost: "https://splunk.domain.com/services/collector", logSplunkToken: "yourtokenhere"));

As with the other log types, there is a LogLevelSplunk setting that allows you to set the minimum log level for the Splunk sink.

I have set the Splunk sink to use the same proxy settings as Seq - so even if you don't use Seq, if you need to set proxy settings for your application to reach Splunk, use the LogSeqUseProxy, LogSeqProxyServer, etc, values.

This is available on Nuget now!

Comments

You may also like:

Lurgle.Alerting v1.1.10 and Lurgle.Logging v1.1.15 Released

I've just pushed out an update to Lurgle.Alerting on Nuget. This release adds a Handlebars template option, based on the implementation by Matthew Turner at FluentEmail.Handlebars (github.com). When I came across the FluentEmail.Handlebars package, I was keen to use it, but it was only compiled against .NET Standard 2.1, and...

Lurgle.Logging v1.2.1 - More logging patterns for your Lurgle convenience

Lurgle approach compared to Serilog Following on from the v1.2.0 multi-threaded correlation release, I thought about whether we could further improve how we interface with Lurgle.Logging. The general approach was to maintain a static interface to logging that would allow us to capture key properties for logging, that would provide nicely...

Lurgle.Logging v1.1.14 and Lurgle.Alerting v1.1.9 Released

I've pushed out updates to Lurgle.Logging and Lurgle.Alerting today. The Lurgle.Logging update is minor - I noticed that Log.Add wasn't correctly passing the calling method, source file, and line number. Lurgle.Alerting has received a more substantial update: This helps to make Lurgle.Alerting even more useful and reliable! You can get...