Nginx: Conditional Log based on log message

212 Views Asked by At

I'm trying to filter my log, based on a string contained in log message. I found some hints to use conditional logging (https://www.nginx.com/blog/sampling-requests-with-nginx-conditional-logging/), but i couldn't find any hints for my use case. Is this even possible?

1

There are 1 best solutions below

0
JD2k On

I come to the conclusion that this is not possible, because nginx doesn't even "know" about log messages (console.log...) from passenger. Passenger is just using the same error.log file nginx is using.