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,558 | 9/20/2024 |
5.0.0 | 111 | 9/20/2024 |
4.4.0 | 1,866,265 | 4/1/2020 |
4.3.6 | 432,331 | 3/22/2018 |
4.3.4 | 6,566 | 3/4/2018 |
4.3.0 | 39,470 | 8/9/2017 |
4.1.11 | 78,693 | 2/6/2017 |
4.1.9 | 1,402 | 2/1/2017 |
4.1.2 | 12,042 | 7/11/2016 |
4.1.1 | 1,456 | 7/8/2016 |
3.1.6 | 3,719 | 5/9/2016 |
3.1.5 | 8,114 | 9/9/2015 |
3.1.3 | 1,183 | 9/9/2015 |
3.1.1 | 2,982 | 4/11/2015 |
3.0.1 | 1,678 | 1/13/2015 |
2.3.6 | 1,353 | 1/8/2015 |
2.3.5 | 1,144 | 1/8/2015 |
2.2.5 | 3,657 | 11/24/2014 |
2.1.0 | 3,366 | 10/1/2014 |
2.0.0 | 1,228 | 9/30/2014 |
1.2.0 | 1,491 | 7/4/2014 |
1.1.0 | 1,553 | 5/1/2014 |
1.0.0 | 2,065 | 7/25/2013 |