From 0a213ab691111b85fa2015bb269d1313fc3d9521 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 25 May 2023 14:30:10 +0200 Subject: [PATCH] backend-app-api: log root lifecycle hook success with debug level Signed-off-by: Patrik Oldsberg --- .../rootLifecycle/rootLifecycleServiceFactory.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/backend-app-api/src/services/implementations/rootLifecycle/rootLifecycleServiceFactory.ts b/packages/backend-app-api/src/services/implementations/rootLifecycle/rootLifecycleServiceFactory.ts index 045c5e8267..39e66458c3 100644 --- a/packages/backend-app-api/src/services/implementations/rootLifecycle/rootLifecycleServiceFactory.ts +++ b/packages/backend-app-api/src/services/implementations/rootLifecycle/rootLifecycleServiceFactory.ts @@ -48,13 +48,13 @@ export class BackendLifecycleImpl implements RootLifecycleService { } this.#hasStarted = true; - this.logger.info(`Running ${this.#startupTasks.length} startup tasks...`); + this.logger.debug(`Running ${this.#startupTasks.length} startup tasks...`); await Promise.all( this.#startupTasks.map(async ({ hook, options }) => { const logger = options?.logger ?? this.logger; try { await hook(); - logger.info(`Startup hook succeeded`); + logger.debug(`Startup hook succeeded`); } catch (error) { logger.error(`Startup hook failed, ${error}`); } @@ -81,13 +81,15 @@ export class BackendLifecycleImpl implements RootLifecycleService { } this.#hasShutdown = true; - this.logger.info(`Running ${this.#shutdownTasks.length} shutdown tasks...`); + this.logger.debug( + `Running ${this.#shutdownTasks.length} shutdown tasks...`, + ); await Promise.all( this.#shutdownTasks.map(async ({ hook, options }) => { const logger = options?.logger ?? this.logger; try { await hook(); - logger.info(`Shutdown hook succeeded`); + logger.debug(`Shutdown hook succeeded`); } catch (error) { logger.error(`Shutdown hook failed, ${error}`); }