Skip to content

Commit

Permalink
fix: logging logLevel
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine authored Mar 3, 2019
1 parent f6dffb0 commit fbb0833
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

Expand All @@ -41,4 +39,4 @@ export function logger(winstonInstance) {

winstonInstance.log(logLevel, msg);
};
}
}

0 comments on commit fbb0833

Please sign in to comment.