BUG report: error log separation per virtual host does not work

mike mike503 at gmail.com
Thu Jan 8 09:00:07 MSK 2009


Conditional error logging is one thing I'd like to see, I've asked in the past.

For things like

if ($remote_addr ~ 10.22.33.44) {
 error_log off;
}

or location / server block based, etc?

On Wed, Jan 7, 2009 at 9:09 PM, Dan Dascalescu
<ddascalescu+nginx at gmail.com> wrote:
> I reported this bug already at
> http://thread.gmane.org/gmane.comp.web.nginx.english/1604/focus=1628
> but was using the stable version of nginx. I just upgraded to the
> latest development version, 0.7.30, and the bug is still there:
>
> I want to have separate error logs for each virtual host. Here is my
> config file, with only one host so far:
>
> error_log  logs/main_error.log;
>
> events {
>   worker_connections  1024;
> }
>
> http {
>   error_log logs/http_error.log;
>   server {
>       server_name myname.org;
>       access_log logs/the_org.access;
>       error_log logs/the_org.error;
>   }
> }
>
> Here is the problem: when the server receives a request for
> http://myname.org/nonexistent.file, the request shows up in the access
> log (the_org.access), but all 3 error logs remain blank. The error
> only shows up in the main_error.log if I comment the
> "error_log logs/http_error.log;"
> and
> "error_log logs/the_org.error;"
> lines.
>
> Can this bug please be fixed? Lighttpd's author refused to implement
> error log separation (see
> http://www.wikivs.com/wiki/Lighttpd_vs_nginx#Separated_error_logging_per_virtual_server)
> and I really hoped that nginx could do better...
>
> Best regards,
> Dan Dascalescu
>
>





More information about the nginx mailing list