Serilog.Sinks.AzureQueueStorage 0.2.0

dotnet add package Serilog.Sinks.AzureQueueStorage --version 0.2.0
NuGet\Install-Package Serilog.Sinks.AzureQueueStorage -Version 0.2.0
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="Serilog.Sinks.AzureQueueStorage" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Sinks.AzureQueueStorage --version 0.2.0
#r "nuget: Serilog.Sinks.AzureQueueStorage, 0.2.0"
#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 Serilog.Sinks.AzureQueueStorage as a Cake Addin
#addin nuget:?package=Serilog.Sinks.AzureQueueStorage&version=0.2.0

// Install Serilog.Sinks.AzureQueueStorage as a Cake Tool
#tool nuget:?package=Serilog.Sinks.AzureQueueStorage&version=0.2.0

Serilog.Sinks.AzureQueueStorage Build status NuGet version

Writes to a queue in Windows Azure Queue Storage.

Package - Serilog.Sinks.AzureQueueStorage

Modeled After - Serilog.Sinks.AzureTableStorage

Example Use Case - Log messages to an Azure storage queue and process asynchronously using an Azure Function.

var storage = CloudStorageAccount.FromConfigurationSetting("MyStorage");

var log = new LoggerConfiguration()
    .WriteTo.AzureQueueStorage(storage)
    .CreateLogger();

JSON configuration

It is possible to configure the sink using Serilog.Settings.Configuration by specifying the queue name and connection string in appsettings.json:

"Serilog": {
  "WriteTo": [
    {"Name": "AzureQueueStorage", "Args": {"storageQueueName": "", "connectionString": ""}}
  ]
}

JSON configuration must be enabled using ReadFrom.Configuration(); see the documentation of the JSON configuration package for details.

XML <appSettings> configuration

To use the file sink with the Serilog.Settings.AppSettings package, first install that package if you haven't already done so:

Install-Package Serilog.Settings.AppSettings

Instead of configuring the logger in code, call ReadFrom.AppSettings():

var log = new LoggerConfiguration()
    .ReadFrom.AppSettings()
    .CreateLogger();

In your application's App.config or Web.config file, specify the file sink assembly and required path format under the <appSettings> node:

<configuration>
  <appSettings>
    <add key="serilog:using:AzureQueueStorage" value="Serilog.Sinks.AzureQueueStorage" />
    <add key="serilog:write-to:AzureQueueStorage.connectionString" value="DefaultEndpointsProtocol=https;AccountName=ACCOUNT_NAME;AccountKey=KEY;EndpointSuffix=core.windows.net" />
    <add key="serilog:write-to:AzureQueueStorage.storageQueueName" value="YOUR_STORAGE_QUEUE_NAME" />
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.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Framework net461 is compatible.  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.

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
0.2.0 12,679 11/25/2018