Skip to content

Commit b0eeba4

Browse files
authored
fix: exclude /healthz requests from auto-logging (#26)
1 parent 1c5b974 commit b0eeba4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/bootstrap.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ const loggerMiddleware = pinoHttp({
4141

4242
return id;
4343
},
44+
autoLogging: {
45+
ignore: (req) => {
46+
if (req.url?.endsWith("/healthz")) {
47+
return true;
48+
}
49+
50+
return false;
51+
},
52+
},
4453
});
4554

4655
// Main entrypoint to the application, where all the startup logic is defined.

0 commit comments

Comments
 (0)