December 04, 2009 10:11AM
Maxim Dounin Wrote:
-------------------------------------------------------
> BTW, could you please explain why do you need time
> in this particular
> format?

Many log parsing and event correlation tools need the time with miliseconds, which $time_local doesn't produce. However, many of these tools also cannot hanlde the "number if miliseconds since start of UNIX time" that nginx produces with $msec.

A nice option would be to output ISO-8601 format time stamps in logs, which just about every tool can handle, such as this:
2009-12-04T13:48:22.432Z

These are also human-readable time stamps that include miliseconds, which is nice. Even Microsoft IIS can do this.

See:
http://en.wikipedia.org/wiki/ISO_8601
Subject Author Posted

How to log the time in the UTC time format?

naltimari November 30, 2009 04:31PM

Re: How to log the time in the UTC time format?

Maxim Dounin November 30, 2009 04:56PM

Re: How to log the time in the UTC time format?

naltimari November 30, 2009 05:06PM

Re: How to log the time in the UTC time format?

Maxim Dounin November 30, 2009 06:34PM

Re: How to log the time in the UTC time format?

naltimari November 30, 2009 06:52PM

Re: How to log the time in the UTC time format?

rmalayter December 04, 2009 10:11AM

Re: How to log the time in the UTC time format?

Igor Sysoev December 01, 2009 02:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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