BugsRadar

log4net appender

Updated 1 October 2026 · BugsRadar team

The BugsRadar.Log4Net package adds an appender: events at ERROR and above go to your channels. It brings BugsRadar with it, so the ILogger provider and direct calls are there too.

You need a BugsRadar project with a channel and the project's API key first: see Get started. The key is secret: where it may go.

Install

Terminal
dotnet add package BugsRadar.Log4Net

log4net.config

log4net.config
<log4net>
  <appender name="BugsRadar" type="BugsRadar.Extensions.Log4Net.BugsRadarAppender, BugsRadar.Log4Net">
    <apiKey value="${BUGSRADAR_KEY}" />
    <environment value="Production" />
  </appender>
  <root>
    <level value="INFO" />
    <appender-ref ref="BugsRadar" />
  </root>
</log4net>

${BUGSRADAR_KEY} is an environment variable: log4net substitutes it when it reads the file.

Levels, grouping and diagnostics

The appender takes ERROR and above; <threshold value="WARN" /> inside it lowers the floor. log4net has no message templates, so an event without an exception is grouped by its text with numbers, ids and quoted values masked: Order 42 failed and Order 43 failed are one error with a count. LogManager.Shutdown() drains the queue, and delivery problems go to log4net's internal log.

What the message looks like in the chat, how repeats are counted and when errors are bundled: see What you receive.

Next: BugsRadar for Node.js →