Skip to content

Commit

Permalink
chore: capitalize logs
Browse files Browse the repository at this point in the history
  • Loading branch information
StarpTech committed Jul 18, 2024
1 parent 7b26897 commit a4d1d00
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?.()
Expand All @@ -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()
Expand All @@ -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()
}

Expand All @@ -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))
Expand Down

0 comments on commit a4d1d00

Please sign in to comment.