问题描述
我如何配置Apache 2.0的日志格式,使其时间戳每个请求日志以毫秒(或微秒)的准确性?该说,戳在的strftime格式指定和strftime似乎没有不处理点儿小于秒的。
How do I configure Apache 2.0's log format so that it timestamps each request log with millisecond (or microsecond) accuracy? The docs say that timestamps are specified in strftime format and strftime doesn't seem to handle anyting smaller than seconds.
推荐答案
我不认为这是可能的(而无需重写APR,ATLEAST)。 Apache使用。在Unix上,这就要求C库的strftime,但即使不填到毫秒TM结构(这并不奇怪,因为这种结构通常不支持毫秒摆在首位)。在Windows版本没有太大的不同。
I don't think it's possible (without rewriting APR, atleast). Apache uses apr_strftime. On Unix, this calls the C library's strftime, but doesn't even fill milliseconds into struct tm (not surprisingly, because this structure doesn't usually support milliseconds in the first place). The Windows versions isn't much different.
这篇关于如何使用时间戳精确到毫秒请求日志Apache 2.0中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!