diff --git a/Content.Server/Database/ServerDbManager.cs b/Content.Server/Database/ServerDbManager.cs index e3cfb66c7f..0498571895 100644 --- a/Content.Server/Database/ServerDbManager.cs +++ b/Content.Server/Database/ServerDbManager.cs @@ -408,6 +408,7 @@ namespace Content.Server.Database private ServerDbBase _db = default!; private LoggingProvider _msLogProvider = default!; private ILoggerFactory _msLoggerFactory = default!; + private ISawmill _sawmill = default!; private bool _synchronous; // When running in integration tests, we'll use a single in-memory SQLite database connection. @@ -423,6 +424,7 @@ namespace Content.Server.Database { builder.AddProvider(_msLogProvider); }); + _sawmill = _logMgr.GetSawmill("db.manager"); _synchronous = _cfg.GetCVar(CCVars.DatabaseSynchronous); @@ -1144,7 +1146,7 @@ namespace Content.Server.Database Password = pass }.ConnectionString; - Logger.DebugS("db.manager", $"Using Postgres \"{host}:{port}/{db}\""); + _sawmill.Debug($"Using Postgres \"{host}:{port}/{db}\""); builder.UseNpgsql(connectionString); SetupLogging(builder); @@ -1167,12 +1169,12 @@ namespace Content.Server.Database if (!inMemory) { var finalPreferencesDbPath = Path.Combine(_res.UserData.RootDir!, configPreferencesDbPath); - Logger.DebugS("db.manager", $"Using SQLite DB \"{finalPreferencesDbPath}\""); + _sawmill.Debug($"Using SQLite DB \"{finalPreferencesDbPath}\""); getConnection = () => new SqliteConnection($"Data Source={finalPreferencesDbPath}"); } else { - Logger.DebugS("db.manager", "Using in-memory SQLite DB"); + _sawmill.Debug("Using in-memory SQLite DB"); _sqliteInMemoryConnection = new SqliteConnection("Data Source=:memory:"); // When using an in-memory DB we have to open it manually // so EFCore doesn't open, close and wipe it every operation.