Right now there's no log entry for successful purges that return a 200 response and an error level entry for any non-200 response.
nginx returns a 404 if the page isn't in the cache. It's not really an error if the page doesn't exist in the cache at the time of the purge.
It might be more useful to have a normal log entry that displays both successful purges and unsuccessful purges.
Comments
Comment #1
SqyD commentedAgreed, the error logging needs some work. Right now the varnish config I use is very simple. A 404 should be implementable on Varnish too. I'll need to check what usefull error codes squid can return...
Comment #2
brianmercer commentedI'm trying to come up with an nginx config that will return a 200 on a miss.
EDIT: OK, this seems to work alright:
And with all 200 responses, the log looks good. Thanks.
Comment #3
SqyD commentedYour solution sure fixes it for now but having this hit/miss information could be very useful when debugging. To minimize resources I ignore the output of the curl request, just error code handling.
I propose to keep the nginx specific stuff in the other issue and keep this one as a feature request for better error handling.
Comment #4
SqyD commentedComment #5
SqyD commentedI've restructured the error handling code in current dev. This will go into a 1.1 release. It now shows detailed results, even if all seems fine. It also picks up on 404 (not found) errors correctly.