-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
need to exclude certain url paths #23
Comments
Hi @bigriot ! You can try something like this app.use(async (ctx, next) => {
if (ctx.url === '/ping') {
await next();
} else {
await logger()(ctx, next);
}
}); |
This method is not ideal. If the ignored route uses a log function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My server receives health check pings from a load balancer via '/ping'.
The health check happens every 30 seconds so meaningless logs will pile up rather quickly, especially if I've got multiple instances running at the same time.
I think hapi-pino has something like this with an ignorePaths option, and was wondering if we could get something similar for koa.
The text was updated successfully, but these errors were encountered: