feat(backend): make requests to health endpoint debug log level

avoids spam in docker
This commit is contained in:
tigattack
2025-09-21 23:22:29 +01:00
parent 5dafe34322
commit 517b5cd7cb

View File

@@ -273,8 +273,13 @@ app.use(express.urlencoded({ extended: true, limit: process.env.JSON_BODY_LIMIT
// Request logging - only if logging is enabled
if (process.env.ENABLE_LOGGING === 'true') {
app.use((req, res, next) => {
logger.info(`${req.method} ${req.path} - ${req.ip}`);
app.use((req, _, next) => {
// Log health check requests at debug level to reduce log spam
if (req.path === '/health') {
logger.debug(`${req.method} ${req.path} - ${req.ip}`);
} else {
logger.info(`${req.method} ${req.path} - ${req.ip}`);
}
next();
});
}