Added blazor logging to serilog

This commit is contained in:
Max 2023-06-14 19:57:50 +02:00
parent 91b28de875
commit 2e619eb48a
2 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using MudBlazor; using MudBlazor;
using MudBlazor.Services; using MudBlazor.Services;
using Serilog;
using SharpRss.Services; using SharpRss.Services;
using WebSharpRSS; using WebSharpRSS;
using WebSharpRSS.Models; using WebSharpRSS.Models;
@ -10,6 +11,7 @@ using WebSharpRSS.Models;
Bootstrapper.Bootstrap(); Bootstrapper.Bootstrap();
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
builder.Logging.AddSerilog();
builder.Services.AddRazorPages(); builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor(); builder.Services.AddServerSideBlazor();
builder.Services.AddSingleton<RssService>(); builder.Services.AddSingleton<RssService>();

View File

@ -17,6 +17,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="MudBlazor" Version="6.2.2" /> <PackageReference Include="MudBlazor" Version="6.2.2" />
<PackageReference Include="Serilog.Extensions.Logging" Version="7.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>