Skip to content

Commit

Permalink
Merge pull request #18 from Ali-YousefiTelori/develop
Browse files Browse the repository at this point in the history
fix injection null bug
  • Loading branch information
Ali-YousefiTelori authored Dec 4, 2023
2 parents 75e1cfc + e464350 commit ad78a02
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.3</Version>
<Version>0.0.0.4</Version>
<Description>logger wrapper</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>log,logger,logging,log4net</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.3</Version>
<Version>0.0.0.4</Version>
<Description>logger wrapper</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>log,logger,logging</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using EasyMicroservices.Logger.Options;
using EasyMicroservices.Logger.Interfaces;
using EasyMicroservices.Logger.Options;
using System;

namespace Microsoft.Extensions.DependencyInjection
Expand Down Expand Up @@ -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<ILoggerProvider>(service => LoggerOptionBuilder.GetLogger());
return services;
}

Expand All @@ -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<ILoggerProvider>(service => LoggerOptionBuilder.GetLogger());
return services;
}

Expand All @@ -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<ILoggerProvider>(service => LoggerOptionBuilder.GetLogger());
return services;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.3</Version>
<Version>0.0.0.4</Version>
<Description>logger wrapper</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>log,logger,logging,nlog</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.3</Version>
<Version>0.0.0.4</Version>
<Description>logger wrapper</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>log,logger,logging,serilog</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.3</Version>
<Version>0.0.0.4</Version>
<Description>Logger and Auditing system</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>logging,auditing</PackageTags>
Expand Down

0 comments on commit ad78a02

Please sign in to comment.