Welcome! Log In Create A New Profile

Advanced

Re: $server_name in error_log logfile name

Maxim Dounin
September 23, 2011 07:20AM
Hello!

On Fri, Sep 23, 2011 at 06:52:50AM -0400, Hety wrote:

> Why its supports it in access_log then? I fail to see logic here.

Access log is quite different as it's only needed/used during
http request processing. On the other hand, error_log is global thing
and used even if no http requests exists, e.g. to log signals and
various other internal actions. It's not possible to use
variables which are only exists in http request context to log
internal actions.

And again (this tends to be a FAQ):

You shouldn't use variables to shorten configs by storing static
strings in them. Variables are evaluated at run-time during
request process, they are costly compared to static strings. You
need some macro expansion instead. Right now it may be done via
external tools, e.g. sed + make will do (as well as any other
template mechanism).

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

$server_name in error_log logfile name

Hety September 21, 2011 08:39AM

Re: $server_name in error_log logfile name

etrader September 22, 2011 01:17PM

Re: $server_name in error_log logfile name

Hety September 23, 2011 06:52AM

Re: $server_name in error_log logfile name

Maxim Dounin September 23, 2011 07:20AM

Re: $server_name in error_log logfile name

Hety September 23, 2011 07:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 180
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