diff --git a/BililiveRecorder.Cli/Program.cs b/BililiveRecorder.Cli/Program.cs index 9345f9a..2a3fae4 100644 --- a/BililiveRecorder.Cli/Program.cs +++ b/BililiveRecorder.Cli/Program.cs @@ -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);