Start off by two apologies. First I was not able to create post in the pnoenix forum, the “New Topic” button is disabled. So posting in the general forum, hope that is ok. Does tagging do the trick??
Second, I’ve searched the web, the docs, and looked at examples, but this is not in any way obvious to me how to do. So if this has been asked and answered, just point me in the right direction.
Our logs are overwhelmed by phoenix request logging. And after moving to k8s, health checks are taking over. Not a big deal, but we do have to pay more for our logg aggregator. So it would be nice to shorten.
Typical request log result:
Feb 03 09:58:36 PROD Phoenix.Logger [info] [line: 178, function: "phoenix_endpoint_start/4"] HEAD /api/health
Feb 03 09:58:36 PROD Phoenix.Logger [info] [line: 191, function: "phoenix_endpoint_stop/4"] Sent 200 in 2ms
Is there any way to shorten this to one line. E.g.:
Feb 03 09:58:36 PROD Phoenix.Logger [info] [line: 191, function: "phoenix_endpoint_stop/4"] Sent 200 in 2ms HEAD /api/health
Not important that it has this exact format, but it is nice to have all the information on one line.
And a bonus follow up. Is it possible to filter out specific routes, e.g. we are not really interested in request logging of the /api/health path.
Best regards,
Alf Kristian