PATCH: $time_custom supports a custom log timestamp
Wayne Davison
wayned at opencoder.net
Tue Aug 25 03:58:06 MSD 2009
On Mon, Aug 24, 2009 at 11:02:49AM -0700, Wayne Davison wrote:
> Here's the patch:
>
> http://opencoder.net/nginx-time_custom.patch
I updated a patch a little, and replaced the patch at the above link
with the new (complete) set of changes. To see what changed, see the
following two patches (which could be incrementally applied if you
grabbed the prior patch):
1. I optimized away a once-a-second call to strchr() for those using
the $ms expansion. (After the first time we find the '$' in the
expanded string, it should be in the same place each time after that.)
http://opencoder.net/nginx-time_custom-strchr.patch
2. I tweaked the variable lookup to use a new getlen pointer in the
ngx_http_log_var_t structure. This lets me add the $time_custom var
into the normal list of log vars, and remove the special-case var-
finding code I had used for $time_custom.
http://opencoder.net/nginx-time_custom-lookup.patch
..wayne..
More information about the nginx
mailing list