log4net.LokiAppender
1.0.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package log4net.LokiAppender --version 1.0.4
NuGet\Install-Package log4net.LokiAppender -Version 1.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="log4net.LokiAppender" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add log4net.LokiAppender --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: log4net.LokiAppender, 1.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. 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.4 // Install log4net.LokiAppender as a Cake Tool #tool nuget:?package=log4net.LokiAppender&version=1.0.4
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")));
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
- log4net (>= 2.0.8)
- Newtonsoft.Json (>= 12.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.