diff --git a/Aaru.Server/Aaru.Server.csproj b/Aaru.Server/Aaru.Server.csproj index 4c42df18..b5e60f78 100644 --- a/Aaru.Server/Aaru.Server.csproj +++ b/Aaru.Server/Aaru.Server.csproj @@ -21,6 +21,7 @@ + diff --git a/Aaru.Server/Program.cs b/Aaru.Server/Program.cs index ce1702ce..ecd09c89 100644 --- a/Aaru.Server/Program.cs +++ b/Aaru.Server/Program.cs @@ -1,3 +1,4 @@ +#pragma warning disable VSTHRD200 using System.Diagnostics; using Aaru.CommonTypes.Interop; using Aaru.Server.Components; @@ -7,6 +8,7 @@ using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.EntityFrameworkCore; using Serilog; +using Serilog.Events; using DbContext = Aaru.Server.Database.DbContext; using Version = System.Version; @@ -70,6 +72,11 @@ WebApplicationBuilder builder = WebApplication.CreateBuilder(args); builder.Logging.AddSerilog(new LoggerConfiguration().WriteTo.Console().CreateLogger()); #endif +builder.Logging.AddSerilog(new LoggerConfiguration().WriteTo + .LocalSyslog("aaru-server", + restrictedToMinimumLevel: LogEventLevel.Information) + .CreateLogger()); + // Add services to the container. builder.Services.AddRazorComponents().AddInteractiveServerComponents(); @@ -174,4 +181,5 @@ using(IServiceScope scope = app.Services.CreateScope()) Console.WriteLine("\e[31;1mStarting web server...\e[0m"); -await app.RunAsync(); \ No newline at end of file +await app.RunAsync(); +#pragma warning restore VSTHRD200 \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props index bde39dc9..1afbf915 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -30,6 +30,7 @@ +