From f6bf547e1ac913964da04bec4f7bd2ee2c2c27b0 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Mon, 4 Dec 2023 17:49:42 +0330 Subject: [PATCH 1/2] fix injection null bug --- .../LoggerExtensions.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/CSharp/EasyMicroservices.Logger.DependencyInjection/LoggerExtensions.cs b/src/CSharp/EasyMicroservices.Logger.DependencyInjection/LoggerExtensions.cs index 002ef95..b07caaa 100644 --- a/src/CSharp/EasyMicroservices.Logger.DependencyInjection/LoggerExtensions.cs +++ b/src/CSharp/EasyMicroservices.Logger.DependencyInjection/LoggerExtensions.cs @@ -1,4 +1,5 @@ -using EasyMicroservices.Logger.Options; +using EasyMicroservices.Logger.Interfaces; +using EasyMicroservices.Logger.Options; using System; namespace Microsoft.Extensions.DependencyInjection @@ -29,7 +30,7 @@ public static IServiceCollection AddLoggerScoped(this IServiceCollection service { options.ThrowIfNull(nameof(options)); options(new LoggerOption()); - services.AddScoped(service => LoggerOptionBuilder.GetLogger()); + services.AddScoped(service => LoggerOptionBuilder.GetLogger()); return services; } @@ -43,7 +44,7 @@ public static IServiceCollection AddLoggerTransient(this IServiceCollection serv { options.ThrowIfNull(nameof(options)); options(new LoggerOption()); - services.AddTransient(service => LoggerOptionBuilder.GetLogger()); + services.AddTransient(service => LoggerOptionBuilder.GetLogger()); return services; } @@ -57,7 +58,7 @@ public static IServiceCollection AddLoggerSingleton(this IServiceCollection serv { options.ThrowIfNull(nameof(options)); options(new LoggerOption()); - services.AddSingleton(service => LoggerOptionBuilder.GetLogger()); + services.AddSingleton(service => LoggerOptionBuilder.GetLogger()); return services; } } From e46435078dc933aec9023b9743bfafce42574141 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Mon, 4 Dec 2023 17:50:13 +0330 Subject: [PATCH 2/2] update --- .../EasyMicroservices.Logger.Log4net.csproj | 2 +- .../EasyMicroservices.Logger.DependencyInjection.csproj | 2 +- .../EasyMicroservices.Logger.NLog.csproj | 2 +- .../EasyMicroservices.Logger.Serilog.csproj | 2 +- .../EasyMicroservices.Logger/EasyMicroservices.Logger.csproj | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CSharp/EasyMicroservices.Logger. Log4net/EasyMicroservices.Logger.Log4net.csproj b/src/CSharp/EasyMicroservices.Logger. Log4net/EasyMicroservices.Logger.Log4net.csproj index 1b167ee..d349794 100644 --- a/src/CSharp/EasyMicroservices.Logger. Log4net/EasyMicroservices.Logger.Log4net.csproj +++ b/src/CSharp/EasyMicroservices.Logger. Log4net/EasyMicroservices.Logger.Log4net.csproj @@ -17,7 +17,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.3 + 0.0.0.4 logger wrapper EasyMicroservices@gmail.com log,logger,logging,log4net diff --git a/src/CSharp/EasyMicroservices.Logger.DependencyInjection/EasyMicroservices.Logger.DependencyInjection.csproj b/src/CSharp/EasyMicroservices.Logger.DependencyInjection/EasyMicroservices.Logger.DependencyInjection.csproj index 069cd2d..94054c9 100644 --- a/src/CSharp/EasyMicroservices.Logger.DependencyInjection/EasyMicroservices.Logger.DependencyInjection.csproj +++ b/src/CSharp/EasyMicroservices.Logger.DependencyInjection/EasyMicroservices.Logger.DependencyInjection.csproj @@ -17,7 +17,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.3 + 0.0.0.4 logger wrapper EasyMicroservices@gmail.com log,logger,logging diff --git a/src/CSharp/EasyMicroservices.Logger.NLog/EasyMicroservices.Logger.NLog.csproj b/src/CSharp/EasyMicroservices.Logger.NLog/EasyMicroservices.Logger.NLog.csproj index 20b63e9..235238a 100644 --- a/src/CSharp/EasyMicroservices.Logger.NLog/EasyMicroservices.Logger.NLog.csproj +++ b/src/CSharp/EasyMicroservices.Logger.NLog/EasyMicroservices.Logger.NLog.csproj @@ -17,7 +17,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.3 + 0.0.0.4 logger wrapper EasyMicroservices@gmail.com log,logger,logging,nlog diff --git a/src/CSharp/EasyMicroservices.Logger.Serilog/EasyMicroservices.Logger.Serilog.csproj b/src/CSharp/EasyMicroservices.Logger.Serilog/EasyMicroservices.Logger.Serilog.csproj index ba35f51..f950b72 100644 --- a/src/CSharp/EasyMicroservices.Logger.Serilog/EasyMicroservices.Logger.Serilog.csproj +++ b/src/CSharp/EasyMicroservices.Logger.Serilog/EasyMicroservices.Logger.Serilog.csproj @@ -17,7 +17,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.3 + 0.0.0.4 logger wrapper EasyMicroservices@gmail.com log,logger,logging,serilog diff --git a/src/CSharp/EasyMicroservices.Logger/EasyMicroservices.Logger.csproj b/src/CSharp/EasyMicroservices.Logger/EasyMicroservices.Logger.csproj index 1bd4cd2..182e81f 100644 --- a/src/CSharp/EasyMicroservices.Logger/EasyMicroservices.Logger.csproj +++ b/src/CSharp/EasyMicroservices.Logger/EasyMicroservices.Logger.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net6.0 EasyMicroservices true - 0.0.0.3 + 0.0.0.4 Logger and Auditing system EasyMicroservice@gmail.com logging,auditing