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="" />
<add key="LogSplunkToken" value="yourtokenhere" />

and of course via a constructor:

Logging.SetConfig(new LoggingConfig(Logging.Config, logSplunkHost: "", 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!


You may also like:

Lurgle.Logging v1.2.2 - Destructure and mask structured properties!

Update After the original post, I tackled another item I'd been meaning to look at - being able to configure proxy settings for the Serilog Seq sink. Lurgle.Logging v1.2.3 now includes additional optional configurations for the Seq sink's proxy. This is particularly useful for console apps like Seq Reporter, to...

Lurgle.Logging v1.2.0 - Multi-threaded correlation ids are now a thing

Multi-threaded correlation ids were not a thing Following on from my work on Seq.Client.WindowsLogins and the subsequent realisation that EventLog's EntryWritten event handler is bad and should feel bad, I contemplated whether I could apply some of my efforts to solve another issue that had been bugging me. Lurgle.Logging was...

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...