log4net.LokiAppender 1.0.5

Install-Package log4net.LokiAppender -Version 1.0.5
dotnet add package log4net.LokiAppender --version 1.0.5
<PackageReference Include="log4net.LokiAppender" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add log4net.LokiAppender --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: log4net.LokiAppender, 1.0.5"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install log4net.LokiAppender as a Cake Addin
#addin nuget:?package=log4net.LokiAppender&version=1.0.5

// Install log4net.LokiAppender as a Cake Tool
#tool nuget:?package=log4net.LokiAppender&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Appender config

<log4net>
  <appender name="Loki" type="log4net.Appender.LokiAppender, log4net.Appender.Loki">
    <BufferSize  value="1" /> 
    <ServiceUrl value="YOUR_LOKI_SERVICE_URL" />
    <label>
        <key value="environment" />
        <value value="debug" />
    </label>
    <label>
        <key value="app" />
        <value value="MyApp" />
    </label>
  </appender>
  <root>
      <level value="INFO"/>
      <appender-ref ref="Loki"/>
    </root>
</log4net>

Send log with exception

logger.Error("Error message", ex);

Send log with custom labels

logger.Info(new MessageLoki("Test",
  new LokiLabel("labelTitle1", "labelValue1"),
  new LokiLabel("labelTitle2", "labelValue2")));

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5 1,974 5/13/2021
1.0.4 147 3/18/2021
1.0.3 88 3/18/2021
1.0.2 110 3/18/2021
1.0.1 106 3/18/2021
1.0.0 125 3/18/2021