Welcome! Log In Create A New Profile

Advanced

Re: Force Nginx to log error?

Carl Winbäck
June 14, 2020 11:36AM
> 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 is a valid
status code sent from the server to the client. To the client that
might be considered an error, but not to Nginx.

I mean errors on a lower level, i.e. the level of the nginx daemon
itself.

E.g. stuff like this:

2020/06/14 13:13:59 [alert] 700#700: *998 open socket #13 left in connection 11
2020/06/14 13:13:59 [alert] 700#700: *4118 open socket #4 left in connection 13
2020/06/14 13:13:59 [alert] 700#700: *4169 open socket #17 left in connection 16
2020/06/14 13:13:59 [alert] 700#700: aborting

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.

E.g. if I have the following stanza in my config:

error_log /srv/nginx/error.log warn;

Then messages of the warn/error/crit/alert/emerg levels should be
logged and written to the file /srv/nginx/error.log (a file which is
separate from the access log).

I hope it is clearer now what I meant :)
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Force Nginx to log error?

Carl Winbäck June 14, 2020 08:42AM

Re: Force Nginx to log error?

gariac June 14, 2020 09:54AM

Re: Force Nginx to log error?

Carl Winbäck June 14, 2020 11:36AM

Re: Force Nginx to log error?

Carl Winbäck June 20, 2020 04:08AM

Re: Force Nginx to log error?

gariac June 14, 2020 01:02PM

Re: Force Nginx to log error?

J.R. June 14, 2020 05:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 216
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready