Re: Force Nginx to log error?

2020-06-20 Thread Carl Winbäck
On Sun, 14 Jun 2020 at 17:34, Carl Winbäck wrote: > It would be useful to me to be able to trigger such messages, so that > I can verify that they are sent to the right destination. I found a simple way to trigger a message to the error log, so I thought I’d share it in case someone also h

Re: Force Nginx to log error?

2020-06-14 Thread Carl Winbäck
> I'm not sure I understand the question, but how does this sound? I > use a map to catch requests that I don't want. For instance I return > a 444 if I receive a "wget". No, I don’t mean status codes on the HTTP level. Status code 444 is not an error per se that would be sent to the error log, it

Force Nginx to log error?

2020-06-14 Thread Carl Winbäck
Hi folks, Is there any surefire way to force Nginx to log an error? Perhaps some carefully crafted GET request or similar. The reason I’m asking is that I’m doing a lab with Nginx’ error log. Therefore I would like to find a way so that I can force Nginx to log an error. E.g. if I specify "error