Skip to content

This appender will allow log4net to be configured to send log messages to Loki directly.

License

Notifications You must be signed in to change notification settings

anaselhajjaji/log4net.Appender.Loki

Repository files navigation

log4net Loki Appender

This appender will allow log4net to be configured to send log messages to Loki directly.

Dot Net Framework 4 (Build)

Installation

The log4net.Appender.LokiAppender NuGet package can be found here. Alternatively you can install it via one of the following commands below:

NuGet command:

Install-Package log4net.Appender.Loki

Log4net configuration

Sample Log4net config:

<log4net>
  <appender name="loki" type="log4net.Appender.LokiAppender, log4net.Appender.Loki">
    <BufferSize  value="3" /> <!-- To configure the buffer size, default: 512 -->
    <ServiceUrl value="http://localhost:3100" /> <!-- Loki URL -->
    <BasicAuthUserName value="username" /> <!-- To be added if basic authent enabled  -->
    <BasicAuthPassword value="password" /> <!-- To be added if basic authent enabled  -->
    <TrustSelfCignedCerts value="false" /> <!-- To trust self signed certificates. Default: false -->
  </appender>
</log4net>

About

This appender will allow log4net to be configured to send log messages to Loki directly.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages