Error messages when starting BTCPay Server where not shown (Fix #3404)

This commit is contained in:
nicolas.dorier 2022-02-06 14:37:19 +09:00
parent ab8d116f11
commit 5b460f0b4e
No known key found for this signature in database
GPG key ID: 6618763EF09186FE

View file

@ -31,17 +31,13 @@ namespace BTCPayServer
loggerFactory.AddProvider(loggerProvider);
var logger = loggerFactory.CreateLogger("Configuration");
Logs logs = new Logs();
logs.Configure(loggerFactory);
IConfiguration conf = null;
try
{
// This is the only way that LoadArgs can print to console. Because LoadArgs is called by the HostBuilder before Logs.Configure is called
conf = new DefaultConfiguration() { Logger = logger }.CreateConfiguration(args);
if (conf == null)
return;
logs.Configure(loggerFactory);
new BTCPayServerOptions().LoadArgs(conf, logs);
logs.Configure(null);
/////
var builder = new WebHostBuilder()
.UseKestrel()