2

I want to disable /health_check/ logs in my uwsgi.log file. I want the other url logs to be printed. This is my log format.

logformat = "uwsgi:request %(addr) | %(method) %(uri) | %(status) | %(msecs) | %(ctime) | %(vszM)"

I have tried the following to disable health_check url logs.

  1. route-if = equal:${REQUEST_URI};/health_check/ donotlog:
  2. route = ^/health_check donotlog:

None of them seem to work. Also I don't see a problem with internal routing since I don't see any errors in the startup logs when I use route. Any possible solution to make it work?

Schumi
  • 21
  • 1

1 Answers1

0

I have been having the same exact issue as yourself and getting frustrated with log-req-route, which is supposed to work like log-route but for requests. Except it doesn't work.

Unfortunately, all I can say is that route = ^.*cms_healthcheck.*$ donotlog: has actually worked for me and cut out logs of health probes.

Do you definitely have the pcre libraries installed?

(would have posted as comment but not enough rep)

EDIT: Check out these option too https://github.com/unbit/uwsgi/blob/d960f8fdc36b33c60b7291ca8e32dbb5df22cf15/core/uwsgi.c#L764