Can not use $bytes_sent in module (complex values)
Vladimir Shebordaev
vshebordaev at mail.ru
Tue Sep 18 15:56:32 UTC 2012
Hi!
The ngx_http_log module uses indexed variables just like the rewrite
module does.
Hope it helps.
--
Regards,
Vladimir
Tue, 18 Sep 2012 15:55:38 +0200 от Benjamin Grössing <mailtogroe at gmail.com>:
>
>
>
>
>Hello,
>
>
I am currently working on a nginx module, that parses user defined
>
strings for variables using ngx_http_complex_value_t. That works great
>
with all variables defined in ngx_http_variables.c (i.e.
>
$body_bytes_sent). However, variables as $bytes_sent do not exist here
>
since ngx_http_log_module uses its own variable parsing system. What
>
is the best way to use these extra variables in my module? I have
>
thought of the following options, I am not very sure about what is the
>
best way to go:
>
a) Copy the ngx_http_log_module code in my own module and rename every
>
single type and function to avoid double definitions. Reuse functions
>
and types from there.
>
b) Move the ngx_http_log_module code in my own module directory and
>
compile it only there. Reuse functions and types from there.
>
c) Write own variable parsing system, reuse a few snippets from
>
ngx_http_variables and ngx_http_log_module, whatever fits best.
>
d) Use complex values and try to extend the ngx_http_core_variables
>
array to include $body_bytes_sent and the other missing variables (I
>
don't understand why they are not included here anyway?).
>
e) Any better way to achieve that?
>
>
I'd really appreciate your help.
>
>
Regards
>
Benjamin
>
>
_______________________________________________
>
nginx-devel mailing list
>nginx-devel at nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20120918/a89f50ad/attachment.html>
More information about the nginx-devel
mailing list