Merge pull request #1982 from Kukks/hide-conn-string

Do not log the database connection string
This commit is contained in:
Nicolas Dorier 2020-10-14 19:23:04 +09:00 committed by GitHub
commit 5e79f567a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,12 +112,12 @@ namespace BTCPayServer.Hosting
ApplicationDbContextFactory dbContext = null;
if (!String.IsNullOrEmpty(opts.PostgresConnectionString))
{
Logs.Configuration.LogInformation($"Postgres DB used ({opts.PostgresConnectionString})");
Logs.Configuration.LogInformation($"Postgres DB used");
dbContext = new ApplicationDbContextFactory(DatabaseType.Postgres, opts.PostgresConnectionString);
}
else if (!String.IsNullOrEmpty(opts.MySQLConnectionString))
{
Logs.Configuration.LogInformation($"MySQL DB used ({opts.MySQLConnectionString})");
Logs.Configuration.LogInformation($"MySQL DB used");
Logs.Configuration.LogWarning("MySQL is not widely tested and should be considered experimental, we advise you to use postgres instead.");
dbContext = new ApplicationDbContextFactory(DatabaseType.MySQL, opts.MySQLConnectionString);
}