Skip to content

Commit

Permalink
add support for ILoggerProviderAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-YousefiTelori committed Dec 4, 2023
1 parent e464350 commit 39de9eb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 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.4</Version>
<Version>0.0.0.5</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.4</Version>
<Version>0.0.0.5</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
Expand Up @@ -31,6 +31,7 @@ public static IServiceCollection AddLoggerScoped(this IServiceCollection service
options.ThrowIfNull(nameof(options));
options(new LoggerOption());
services.AddScoped<ILoggerProvider>(service => LoggerOptionBuilder.GetLogger());
services.AddScoped<ILoggerProviderAsync>(service => LoggerOptionBuilder.GetLogger());
return services;
}

Expand All @@ -45,6 +46,7 @@ public static IServiceCollection AddLoggerTransient(this IServiceCollection serv
options.ThrowIfNull(nameof(options));
options(new LoggerOption());
services.AddTransient<ILoggerProvider>(service => LoggerOptionBuilder.GetLogger());
services.AddTransient<ILoggerProviderAsync>(service => LoggerOptionBuilder.GetLogger());
return services;
}

Expand All @@ -59,6 +61,7 @@ public static IServiceCollection AddLoggerSingleton(this IServiceCollection serv
options.ThrowIfNull(nameof(options));
options(new LoggerOption());
services.AddSingleton<ILoggerProvider>(service => LoggerOptionBuilder.GetLogger());
services.AddSingleton<ILoggerProviderAsync>(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.4</Version>
<Version>0.0.0.5</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.4</Version>
<Version>0.0.0.5</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.4</Version>
<Version>0.0.0.5</Version>
<Description>Logger and Auditing system</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>logging,auditing</PackageTags>
Expand Down

0 comments on commit 39de9eb

Please sign in to comment.