Skip to content

Latest commit

 

History

History
30 lines (29 loc) · 1.11 KB

README.md

File metadata and controls

30 lines (29 loc) · 1.11 KB

Serilog.Sinks.Humio2

A Serilog sink for Humio.

How to use

  1. Grab the ingest token from Humio. (inside settings => Ingest => API Tokens)
  2. Install the Serilog.Sinks.Humio2 package from NuGet.
  3. If you are using the cloud version of Humio:
var log = new LoggerConfiguration()
	.WriteTo.Humio(ingestToken: "yourIngestTokenHere")
	.CreateLogger();
  1. If you use Humio on-prem:
var log = new LoggerConfiguration()
	.WriteTo.Humio(url:"https://url.onprem.com", ingestToken: "yourIngestTokenHere")
	.CreateLogger();
  1. If you configure the solution via appsettings in web.config:
<appSettings>
	<add key="serilog:using:Humio" value="Serilog.Sinks.Humio" />
	<add key="serilog:write-to:Humio" />
	<add key="serilog:write-to:Humio.ingestToken" value="yourIngestTokenHere" />
</appSettings>

Credits

This work is derived from the following users GitHub gists: