diff --git a/src/logging.ts b/src/logging.ts index a790859..8b88206 100644 --- a/src/logging.ts +++ b/src/logging.ts @@ -14,11 +14,9 @@ export function logger(winstonInstance) { let logLevel: string; if (ctx.status >= 500) { logLevel = 'error'; - } - if (ctx.status >= 400) { + } else if (ctx.status >= 400) { logLevel = 'warn'; - } - if (ctx.status >= 100) { + } else if (ctx.status >= 100) { logLevel = 'info'; } @@ -41,4 +39,4 @@ export function logger(winstonInstance) { winstonInstance.log(logLevel, msg); }; -} \ No newline at end of file +}