From a4d1d00cc2e7c36bd00b4e5991d1badac94282b8 Mon Sep 17 00:00:00 2001 From: starptech Date: Thu, 18 Jul 2024 14:09:09 +0200 Subject: [PATCH] chore: capitalize logs --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 0639ee5..b8939c7 100644 --- a/index.js +++ b/index.js @@ -36,9 +36,9 @@ function fastifyGracefulShutdown(fastify, opts, next) { function completed(err, signal) { if (err) { - logger.error?.({ err: err, signal: signal }, 'process terminated') + logger.error?.({ err: err, signal: signal }, 'Process terminated') } else { - logger.debug?.({ signal: signal }, 'process terminated') + logger.debug?.({ signal: signal }, 'Process terminated') } logger.flush?.() @@ -49,7 +49,7 @@ function fastifyGracefulShutdown(fastify, opts, next) { setTimeout(() => { logger.error?.( { signal: signal, timeout: timeout }, - 'terminate process after timeout', + 'Terminate process after timeout', ) handlerEventListener.exit(1) }, timeout).unref() @@ -61,7 +61,7 @@ function fastifyGracefulShutdown(fastify, opts, next) { return handler(signal) }), ) - logger.debug?.({ signal: signal }, 'closing fastify server') + logger.debug?.({ signal: signal }, 'Closing fastify server') await fastify.close() } @@ -77,7 +77,7 @@ function fastifyGracefulShutdown(fastify, opts, next) { // register handlers signals.forEach((signal) => { const listener = () => { - logger.debug?.({ signal: signal }, 'received signal') + logger.debug?.({ signal: signal }, 'Received signal') terminateAfterTimeout(signal, timeout) shutdown(signal) .then(() => completed(null, signal))