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
<PackageReference Include="Common.Logging.Serilog" Version="5.0.1" />
paket add Common.Logging.Serilog --version 5.0.1
#r "nuget: Common.Logging.Serilog, 5.0.1"
// 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
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 | Versions 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. |
-
.NETFramework 4.6.1
- Common.Logging (>= 3.4.1)
- Common.Logging.Core (>= 3.4.1)
- Serilog (>= 3.1.1)
-
.NETStandard 2.0
- Common.Logging (>= 3.4.1)
- Common.Logging.Core (>= 3.4.1)
- Serilog (>= 3.1.1)
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 (2)
Showing the top 2 popular GitHub repositories that depend on Common.Logging.Serilog:
Repository | Stars |
---|---|
Texnomic/SecureDNS
Secure, Modern, Fully-Featured, All-In-One Cross-Architecture & Cross-Platform DNS Server Using .NET 8.0
|
|
mellowagain/Titan
A free, advanced CS:GO report and commendation bot built with performance and ease-of-use in mind
|
Version | Downloads | Last updated |
---|---|---|
5.0.1 | 1,104 | 9/20/2024 |
5.0.0 | 108 | 9/20/2024 |
4.4.0 | 1,851,884 | 4/1/2020 |
4.3.6 | 431,761 | 3/22/2018 |
4.3.4 | 6,546 | 3/4/2018 |
4.3.0 | 39,418 | 8/9/2017 |
4.1.11 | 78,495 | 2/6/2017 |
4.1.9 | 1,399 | 2/1/2017 |
4.1.2 | 12,011 | 7/11/2016 |
4.1.1 | 1,453 | 7/8/2016 |
3.1.6 | 3,714 | 5/9/2016 |
3.1.5 | 8,111 | 9/9/2015 |
3.1.3 | 1,180 | 9/9/2015 |
3.1.1 | 2,979 | 4/11/2015 |
3.0.1 | 1,675 | 1/13/2015 |
2.3.6 | 1,350 | 1/8/2015 |
2.3.5 | 1,141 | 1/8/2015 |
2.2.5 | 3,651 | 11/24/2014 |
2.1.0 | 3,359 | 10/1/2014 |
2.0.0 | 1,225 | 9/30/2014 |
1.2.0 | 1,488 | 7/4/2014 |
1.1.0 | 1,550 | 5/1/2014 |
1.0.0 | 2,060 | 7/25/2013 |