xss.Logger
4.0.0
This package will handle all login. Nlog, Elmah, etc.
See the version list below for details.
Install-Package xss.Logger -Version 4.0.0
dotnet add package xss.Logger --version 4.0.0
<PackageReference Include="xss.Logger" Version="4.0.0" />
paket add xss.Logger --version 4.0.0
#r "nuget: xss.Logger, 4.0.0"
Release Notes
Supports .Netcore 2.2/3.1 and .netframework 4.7.2/4.8
1. Add "Logger" Key in web config, with Value = "nlog" ; Add "MicrosoftFramework" Key in web config, with Value = "netcore" [for netcore only] | "framework" [for framework only]
example: <add key="Logger" value="nlog" /> , <add key="MicrosoftFramework" value="netcore" />
2. Create variable "static ILoggerHandler log = LoggerFactory.Get (EnumLayerIdentifier.Presentation); " as a global variable in a class
3. Remove Nlog reference,
Add References :
using xss.Logger.Interfaces;
using xss.Logger.Factory;
using xss.Logger.Enums;
4. To use change LogHandler.SaveException to Log.Save ();
5. Change LogLevel to EnumLogLevel
example: log.Save (EnumLogLevel.Fatal, ex);
How to use it in full net core projects: (Need to inject dependencies of the confgi file and the logger)
private IConfiguration Configuration;
private static IConfiguration SetConfig()
{
return new ConfigurationBuilder()
.SetBasePath(AppContext.BaseDirectory)
.AddJsonFile("{filename}.json", false, true)
.Build();
}
Configuration = SetConfig();
LoggerFactory.SetConfiguration(Configuration);
ILoggerHandler log = LoggerFactory.Get(EnumLayerIdentifier.DataAccessLayer);
log.Save (EnumLogLevel.Fatal, ex);
Dependencies
-
.NETCoreApp 2.2
- Microsoft.AspNetCore.Hosting (>= 2.2.7)
- Microsoft.Extensions.Configuration.Json (>= 3.1.2)
- NLog (>= 4.6.8)
- NLog.Extensions.Logging (>= 1.6.1)
- NLog.Web.AspNetCore (>= 4.9.0)
- xss.Enumeration (>= 1.2.3)
- xss.FrameworkConfigurationProxy (>= 1.0.0)
-
.NETCoreApp 3.1
- Microsoft.AspNetCore.Hosting (>= 2.2.7)
- Microsoft.Extensions.Configuration.Json (>= 3.1.2)
- NLog (>= 4.6.8)
- NLog.Extensions.Logging (>= 1.6.1)
- NLog.Web.AspNetCore (>= 4.9.0)
- xss.Enumeration (>= 1.2.3)
- xss.FrameworkConfigurationProxy (>= 1.0.0)
-
.NETFramework 4.7.2
- Microsoft.AspNetCore.Hosting (>= 2.2.7)
- Microsoft.Extensions.Configuration.Json (>= 3.1.2)
- NLog (>= 4.6.8)
- NLog.Extensions.Logging (>= 1.6.1)
- NLog.Web.AspNetCore (>= 4.9.0)
- xss.Enumeration (>= 1.2.3)
- xss.FrameworkConfigurationProxy (>= 1.0.0)
-
.NETFramework 4.8
- Microsoft.AspNetCore.Hosting (>= 2.2.7)
- Microsoft.Extensions.Configuration.Json (>= 3.1.2)
- NLog (>= 4.6.8)
- NLog.Extensions.Logging (>= 1.6.1)
- NLog.Web.AspNetCore (>= 4.9.0)
- xss.Enumeration (>= 1.2.3)
- xss.FrameworkConfigurationProxy (>= 1.0.0)
Used By
NuGet packages (177)
Showing the top 5 NuGet packages that depend on xss.Logger:
| Package | Downloads |
|---|---|
|
xss.ProductEntryBackEnd
Admin product and categories
|
|
|
xss.Market.Client
For another clients not asea.
Need to run the script 2.0.0 in the sql, otherwhise save will don't work.
xss.Market.client >=2.0.0
|
|
|
xss.Logistics.Client
Contains functionalities related to shipping and warehouse configuration
|
|
|
xss.SettingGlobalEngine.NetCore
Package Description
|
|
|
xss.RolesBackend
This nuget is for Backend for User, roles, navsettings, reports_roles and controls management
|