A Serilog sink for Humio.
- Grab the ingest token from Humio. (inside settings => Ingest => API Tokens)
- Install the Serilog.Sinks.Humio2 package from NuGet.
- If you are using the cloud version of Humio:
var log = new LoggerConfiguration()
.WriteTo.Humio(ingestToken: "yourIngestTokenHere")
.CreateLogger();
- If you use Humio on-prem:
var log = new LoggerConfiguration()
.WriteTo.Humio(url:"https://url.onprem.com", ingestToken: "yourIngestTokenHere")
.CreateLogger();
- 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>
This work is derived from the following users GitHub gists: