mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Add Serilog, with sink to console in debug.
This commit is contained in:
@@ -18,6 +18,9 @@
|
|||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite"/>
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite"/>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools"/>
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools"/>
|
||||||
<PackageReference Include="MimeKit"/>
|
<PackageReference Include="MimeKit"/>
|
||||||
|
<PackageReference Include="Serilog"/>
|
||||||
|
<PackageReference Include="Serilog.Extensions.Logging"/>
|
||||||
|
<PackageReference Include="Serilog.Sinks.Console"/>
|
||||||
<PackageReference Include="WebStoating.Markdig.PrismWithPlugins"/>
|
<PackageReference Include="WebStoating.Markdig.PrismWithPlugins"/>
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql"/>
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql"/>
|
||||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design"/>
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design"/>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Aaru.Server.Services;
|
|||||||
using Microsoft.AspNetCore.Components.Authorization;
|
using Microsoft.AspNetCore.Components.Authorization;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Serilog;
|
||||||
using DbContext = Aaru.Server.Database.DbContext;
|
using DbContext = Aaru.Server.Database.DbContext;
|
||||||
using Version = System.Version;
|
using Version = System.Version;
|
||||||
|
|
||||||
@@ -65,7 +66,9 @@ Console.WriteLine("\e[31;1mBuilding web application...\e[0m");
|
|||||||
|
|
||||||
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
|
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
builder.Logging.AddConsole();
|
#if DEBUG
|
||||||
|
builder.Logging.AddSerilog(new LoggerConfiguration().WriteTo.Console().CreateLogger());
|
||||||
|
#endif
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
builder.Services.AddRazorComponents().AddInteractiveServerComponents();
|
builder.Services.AddRazorComponents().AddInteractiveServerComponents();
|
||||||
|
|||||||
@@ -27,6 +27,9 @@
|
|||||||
<PackageVersion Include="Roslynator.Analyzers" Version="4.13.1"/>
|
<PackageVersion Include="Roslynator.Analyzers" Version="4.13.1"/>
|
||||||
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.13.1"/>
|
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.13.1"/>
|
||||||
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.13.1"/>
|
<PackageVersion Include="Roslynator.Formatting.Analyzers" Version="4.13.1"/>
|
||||||
|
<PackageVersion Include="Serilog" Version="4.3.0"/>
|
||||||
|
<PackageVersion Include="Serilog.Extensions.Logging" Version="9.0.2"/>
|
||||||
|
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0"/>
|
||||||
<PackageVersion Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31"/>
|
<PackageVersion Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31"/>
|
||||||
<PackageVersion Include="Text.Analyzers" Version="4.14.0"/>
|
<PackageVersion Include="Text.Analyzers" Version="4.14.0"/>
|
||||||
<PackageVersion Include="WebStoating.Markdig.PrismWithPlugins" Version="1.0.0"/>
|
<PackageVersion Include="WebStoating.Markdig.PrismWithPlugins" Version="1.0.0"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user