Welcome! Log In Create A New Profile

Advanced

Re: Timestamp in log

Maxim Dounin
November 19, 2015 08:12AM
Hello!

On Wed, Nov 18, 2015 at 10:36:07PM -0800, Frank Liu wrote:

> I understand nginx writes the log when request completes, but is time_local
> (or time_iso8601, msec) representing the time that the request was received
> or when the request completes and log written? I know Apache and AWS ELB
> both log the request received time, and want to see nginx works the same.

Both are current time, i.e., the time of the log write. This is
explicitly documented here at
http://nginx.org/en/docs/http/ngx_http_log_module.html#log_format:

: $msec
: time in seconds with a milliseconds resolution at the time of the
: log write

If you want to obtain time of the request start, subtract
$request_time.

--
Maxim Dounin
http://nginx.org/

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

Timestamp in log

Frank Liu November 19, 2015 01:38AM

Re: Timestamp in log

Maxim Dounin November 19, 2015 08:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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