Skip to content
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

Disable access logging or change level of logs for the health endpoints #150

Closed
moritzheiber opened this issue Jan 22, 2020 · 2 comments · Fixed by #151
Closed

Disable access logging or change level of logs for the health endpoints #150

moritzheiber opened this issue Jan 22, 2020 · 2 comments · Fixed by #151

Comments

@moritzheiber
Copy link
Contributor

I would like to be able to disable access logging for the health endpoints, so that I can make sense of my application logs again. Inside Kubernetes, the health endpoints of Keto are checked regularly, with each checks equal to two lines in its logfile.

I would propose either of these two solutions:

  1. Disable access logging for the health endpoints, akin to what Hydra already has implemented.
  2. Shift the level of severity for the logs from info to debug to avoid logging them in a "production" context.

As an example, here are two lines in my logs that I encounter on a regular basis (i.e. every couple of seconds):

{"msg": "started handling request", "request": "/health/ready", "method": "GET", "level": "info", "time": "2020-01-22T11:51:21Z", "remote": "127.0.0.1:50224"}
{"msg": "completed handling request", "text_status": "OK", "request": "/health/alive", "took": 78385,  "measure#keto": {"latency": 78385}, "method": "GET", "level": "info", "time": "2020-01-22T11:52:42Z", "remote": "127.0.0.1:37770", "status": 200}

Note: Not the same event.

Thanks!

@aeneasr
Copy link
Member

aeneasr commented Jan 22, 2020

Good idea, I think it would make sense to do what we've already done in ORY Oathkeeper:

https://github.com/ory/oathkeeper/blob/master/cmd/server/server.go#L82

What do you think? If you're up for it, we'd appreaciate a PR!

@moritzheiber
Copy link
Contributor Author

See #151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants