Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit 1509cf8

Browse files
committed
Aggiunto metodo statico Serilog SEQ
1 parent 5d1ef61 commit 1509cf8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/NET6CustomLibrary/Extensions/DependencyInjection.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ public static IServiceCollection AddSerilogServices(this IServiceCollection serv
1010
return services;
1111
}
1212

13+
public static IServiceCollection AddSerilogSeqServices(this IServiceCollection services)
14+
{
15+
Log.Logger = new LoggerConfiguration().MinimumLevel.Debug().CreateLogger();
16+
17+
services.AddTransient<ILoggerService, LoggerService>();
18+
19+
return services;
20+
}
21+
1322
public static WebApplication AddSerilogConfigureServices(this WebApplication application)
1423
{
1524
application.UseSerilogRequestLogging(options =>

src/NET6CustomLibrary/NET6CustomLibrary.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@
4242
<PackageReference Include="Serilog.Settings.Configuration" Version="3.4.0" />
4343
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" />
4444
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
45+
<PackageReference Include="Serilog.Sinks.Seq" Version="5.2.2" />
4546
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
46-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.128">
47+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.132">
4748
<PrivateAssets>all</PrivateAssets>
4849
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4950
</PackageReference>

0 commit comments

Comments
 (0)