Welcome! Log In Create A New Profile

Advanced

Default log file locations

Peter Bittner
June 27, 2019 01:14PM
Hi there!

In my day job I'm helping to get applications from traditional
environments running in cloud environments. Cloud native applications
are just "normal" applications, but there are a few properties that
they should satisfy (apart from resiliency and scalability).

For logging this boils down to what is prescribed by the 12-factor
app: The log output should be a continuous stream, i.e. simply log to
the terminal.

Now, as of today, at least on Debian based container images, the
behavior of Nginx is to write to /var/log/nginx/access.log and
/var/log/nginx/error.log by default. We try to compensate this by
making those files symbolic links to /dev/stdout and /dev/stderr.
We're doing this also, because there seem to be cases when a log entry
is written _before_ it is configured via the Nginx configuration file.

From my perspective it would be advantageous to have Nginx write to
the terminal by default (i.e. no hardcoded log file locations) and
allow to override this behavior via the Nginx configuration file.

Is there any reason why the default behavior is not that way yet?

Peter
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Default log file locations

Peter Bittner 316 June 27, 2019 01:14PM

Re: Default log file locations

Valentin V. Bartenev 149 June 27, 2019 01:36PM

Re: Default log file locations

Peter Bittner 147 June 27, 2019 01:46PM

Re: Default log file locations

Valentin V. Bartenev 135 June 27, 2019 02:20PM

Re: Default log file locations

Sergey Brester 165 June 27, 2019 02:48PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 155
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready