From 0b1d565dad72210025889217358da598b1f1445a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Tue, 23 Jan 2024 10:24:58 +0100 Subject: [PATCH] chore: add logs (#5996) Validate we're not using locks --- src/lib/server-impl.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/server-impl.ts b/src/lib/server-impl.ts index 26a5382e345f..3ee5cc922002 100644 --- a/src/lib/server-impl.ts +++ b/src/lib/server-impl.ts @@ -140,7 +140,7 @@ async function start(opts: IUnleashOptions = {}): Promise { if (config.db.disableMigration) { logger.info('DB migration: disabled'); } else { - logger.debug('DB migration: start'); + logger.info('DB migration: start'); if (opts.flagResolver?.isEnabled('migrationLock')) { logger.info('Running migration with lock'); const lock = withDbLock(config.db, { @@ -150,10 +150,11 @@ async function start(opts: IUnleashOptions = {}): Promise { }); await lock(migrateDb)(config); } else { + logger.info('Running migration without lock'); await migrateDb(config); } - logger.debug('DB migration: end'); + logger.info('DB migration: end'); } } catch (err) { logger.error('Failed to migrate db', err);