Mahand.Logging
0.0.1.5
dotnet add package Mahand.Logging --version 0.0.1.5
NuGet\Install-Package Mahand.Logging -Version 0.0.1.5
<PackageReference Include="Mahand.Logging" Version="0.0.1.5" />
paket add Mahand.Logging --version 0.0.1.5
#r "nuget: Mahand.Logging, 0.0.1.5"
// Install Mahand.Logging as a Cake Addin #addin nuget:?package=Mahand.Logging&version=0.0.1.5 // Install Mahand.Logging as a Cake Tool #tool nuget:?package=Mahand.Logging&version=0.0.1.5
Hello, thank you for visiting our package
Log is very important for all applications. There are many loggers in C # programming. Each one is easy to use, but it is very difficult when your login strategy changes (change login system) because the logger codes are different. With this package, once our team has fully adapted, you can use the same code for all popular loggers.
Let's try:
Install your required logger package. NLOG: Install the NLog package
If the .Net Core platform is to be installed: Install-Package NLog.Web.AspNetCore
Create [nlog.config] file!
Always right-click on nlog.config → Properties → Copy to Output Directory →
For DI:
Update Startup.cs
- services.AddTransient (Service type: typeof (Mahand.Logging.ILogger <>), implementType: typeof (Mahand.Logging.NLogAdapter <>));
b.services.AddTransient <Microsoft.AspNetCore.Http.IHttpContextAccessorMicrosoft.AspNetCore.Http.HttpContextAccessor> (); To use the login service
Suppose we have a controller called an experiment:
General TestController (Mahand.Logging.ILogger logger): Basic () { Logger = wood breaker; }
Mahand.Logging.ILogger Logger { get; set; }
Now use the Logger property.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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. |
-
net5.0
- NLog (>= 4.7.10)
- NLog.Web.AspNetCore (>= 4.12.0)
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.0.1.5 | 319 | 6/13/2021 |
Published. Just NLog adduptor will be worked