Skip to content

Commit

Permalink
round response time in default log statement
Browse files Browse the repository at this point in the history
  • Loading branch information
samu committed Dec 9, 2024
1 parent f5e31c0 commit 971d7c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/getDefaultLogStatement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const getDefaultLogStatement = async (context: FinalizeContext) => {
const route = `${context.request.method} ${context.request.path}${context.request.query ? "?" : ""}${context.request.query}`;
const statusCode = context.finalizedResponse.statusCode;
const responseTime = endTime - context.startTime;
return `${route} (${statusCode}) (${responseTime}ms)`;
return `${route} (${statusCode}) (${responseTime.toFixed(2)}ms)`;
};

0 comments on commit 971d7c4

Please sign in to comment.