Skip to content

Commit b148335

Browse files
committed
use existing logger and ignore server-status requests
1 parent d6e8a7a commit b148335

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/services/webapp/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ export class WebApp extends Service {
1717
constructor(container: Container) {
1818
super(container);
1919

20-
this.app.use(pinoHttp({ base: undefined, level: process.env.LOG_LEVEL || "info" }));
20+
this.app.use(
21+
pinoHttp({
22+
logger: log,
23+
base: undefined,
24+
level: process.env.LOG_LEVEL || "info",
25+
autoLogging: { ignore: req => req.url.startsWith("/server-status") },
26+
})
27+
);
2128

2229
for (const addAPI of APIs) {
2330
addAPI(this);

0 commit comments

Comments
 (0)