BlueSkyDev.Logging.AzureEventHubAppender 1.1.0-CI-20200103-191040

This is a prerelease version of BlueSkyDev.Logging.AzureEventHubAppender.
There is a newer version of this package available.
See the version list below for details.
dotnet add package BlueSkyDev.Logging.AzureEventHubAppender --version 1.1.0-CI-20200103-191040
NuGet\Install-Package BlueSkyDev.Logging.AzureEventHubAppender -Version 1.1.0-CI-20200103-191040
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="BlueSkyDev.Logging.AzureEventHubAppender" Version="1.1.0-CI-20200103-191040" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlueSkyDev.Logging.AzureEventHubAppender --version 1.1.0-CI-20200103-191040
#r "nuget: BlueSkyDev.Logging.AzureEventHubAppender, 1.1.0-CI-20200103-191040"
#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 BlueSkyDev.Logging.AzureEventHubAppender as a Cake Addin
#addin nuget:?package=BlueSkyDev.Logging.AzureEventHubAppender&version=1.1.0-CI-20200103-191040&prerelease

// Install BlueSkyDev.Logging.AzureEventHubAppender as a Cake Tool
#tool nuget:?package=BlueSkyDev.Logging.AzureEventHubAppender&version=1.1.0-CI-20200103-191040&prerelease

Introduction

This project is a log4net appender that will write to an Azure Event Hub.

This Appender has a front end that takes in messages. A blocking collection is used as a buffer between the front end and the backend. As the front end taked in messages, they are stored in the blocking collection. The backend is a thread that reads from the blocking collection and sends messages to the event hub. If there are multiple messages available they will be sent to the event hub.

Getting Started

  1. Add a Nuget reference to BlueSkyDev.Logging.AzureEventHubAppender (URL TBD)

  2. For a .NET Framework application add the following log4net configuration to either your log4net.config file or yout app.config file.

<?xml version="1.0" encoding="utf-8"?>
<log4net>
  <root>
    <level value="INFO"/>
    <appender-ref ref="AzureEventHubAppender"/>
  </root>
 <appender name="AzureEventHubAppender" type="BlueSkyDev.Logging.AzureEventHubAppender, BlueSkyDev.Logging.AzureEventHubAppender">
    <param name="ConnectionString" value="" />
    <param name="BufferSize" value="3000" />
    <param name="BatchSize" value="200" />
    <param name="LogAsJson" value="true" />
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="date=%utcdate|Thread=%thread|Message=%message|Level=%level|Logger=%logger" />
    </layout>
  </appender>
</log4net>

NOTE: By default, the logger will produce a JSON output. In order to make sure this works properly, make sure your conversionPattern value has a delimited format of "key1=%pattern1|key2=%pattern2|key3=%pattern3". This will allow the appender to parse the pattern and generate the JSON that gets sent to the EventHub.

If you want to send the pattern as you have written it, change the LogAsJson parameter value to false.

You can set your ConnectionString via an Environment Variable named AzureEventHubAppenderConnectionString

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.3.2 667 4/12/2021
1.3.0 656 12/11/2020
1.2.1 642 7/6/2020
1.2.0-CI-20200609-131213 343 6/9/2020
1.1.0-CI-20200103-191040 402 1/3/2020