mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +08:00
feat: limit aspnetcore logging level to error on release builds
This commit is contained in:
parent
e0cd372efc
commit
05c347e0fc
|
@ -201,8 +201,14 @@ namespace BililiveRecorder.Cli
|
|||
}
|
||||
else
|
||||
{
|
||||
#if DEBUG
|
||||
const LogEventLevel webLogEventLevel = LogEventLevel.Debug;
|
||||
#else
|
||||
const LogEventLevel webLogEventLevel = LogEventLevel.Error;
|
||||
#endif
|
||||
|
||||
host = new HostBuilder()
|
||||
.UseSerilog(logger: logger)
|
||||
.UseSerilog(logger: new LoggerConfiguration().MinimumLevel.Is(webLogEventLevel).WriteTo.Logger(logger).CreateLogger(), dispose: true)
|
||||
.ConfigureServices(services =>
|
||||
{
|
||||
services.AddSingleton(recorderAccessProxy);
|
||||
|
|
Loading…
Reference in New Issue
Block a user