Common.Logging.Serilog 5.0.1

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

// Install Common.Logging.Serilog as a Cake Tool
#tool nuget:?package=Common.Logging.Serilog&version=5.0.1                

Common.Logging.Serilog

NuGet version Build status

Common.Logging.Serilog is an adapter that bridges the Common.Logging abstraction with Serilog, allowing you to use Serilog as the underlying logging framework in applications that rely on Common.Logging.

Installation

Install the package via NuGet Package Manager:

Install-Package Common.Logging.Serilog

Or using the .NET CLI:

dotnet add package Common.Logging.Serilog

Getting Started

Configuring Common.Logging

Update your app.config or web.config file to use the Serilog factory adapter:

<configuration>
  <configSections>
    <sectionGroup name="common">
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
    </sectionGroup>
  </configSections>

  <common>
    <logging>
      <factoryAdapter type="Common.Logging.Serilog.SerilogFactoryAdapter, Common.Logging.Serilog" />
    </logging>
  </common>
</configuration>

Setting Up Serilog & Usage Example

Configure Serilog and assign it to the global Log.Logger instance:

using Serilog;
using Common.Logging;

class Program
{
    static void Main(string[] args)
    {
        // Configure Serilog: -- Must set global Log.Logger instance
        Log.Logger = new LoggerConfiguration()
            .WriteTo.Console()
            .CreateLogger();

        // Obtain a Common.Logging logger
        var logger = LogManager.GetLogger<Program>();
        logger.Info("Application has started.");

        // Your application code here

        // Ensure to flush and close Serilog at the end
        Log.CloseAndFlush();
    }
}

License

This project is licensed under the MIT License.

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 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on Common.Logging.Serilog:

Package Downloads
Texnomic.SecureDNS.Core

Texnomic SecureDNS Core Library.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.0.1 1,436 9/20/2024
5.0.0 110 9/20/2024
4.4.0 1,860,513 4/1/2020
4.3.6 432,193 3/22/2018
4.3.4 6,556 3/4/2018
4.3.0 39,466 8/9/2017
4.1.11 78,628 2/6/2017
4.1.9 1,401 2/1/2017
4.1.2 12,030 7/11/2016
4.1.1 1,455 7/8/2016
3.1.6 3,718 5/9/2016
3.1.5 8,113 9/9/2015
3.1.3 1,182 9/9/2015
3.1.1 2,981 4/11/2015
3.0.1 1,677 1/13/2015
2.3.6 1,352 1/8/2015
2.3.5 1,143 1/8/2015
2.2.5 3,656 11/24/2014
2.1.0 3,363 10/1/2014
2.0.0 1,227 9/30/2014
1.2.0 1,490 7/4/2014
1.1.0 1,552 5/1/2014
1.0.0 2,062 7/25/2013