<HTML><BODY>Hi!<br> <br> The ngx_http_log module uses indexed variables just like the rewrite<br> module does.<br> <br> Hope it helps.<br> <br> --<br> Regards,<br> Vladimir<br> <br><br><br>Tue, 18 Sep 2012 15:55:38 +0200 от Benjamin Grössing <mailtogroe@gmail.com>:<br>
<blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;" class="mailru-blockquote">
        <div id=""><div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div id="style_13479765690000000774" class="mr_read__body">
                <base target="_self" href="https://e.mail.ru/cgi-bin/">
                
                        <div id="style_13479765690000000774_BODY">Hello,<br>
<br>
I am currently working on a nginx module, that parses user defined<br>
strings for variables using ngx_http_complex_value_t. That works great<br>
with all variables defined in ngx_http_variables.c (i.e.<br>
$body_bytes_sent). However, variables as $bytes_sent do not exist here<br>
since ngx_http_log_module uses its own variable parsing system. What<br>
is the best way to use these extra variables in my module? I have<br>
thought of the following options, I am not very sure about what is the<br>
best way to go:<br>
a) Copy the ngx_http_log_module code in my own module and rename every<br>
single type and function to avoid double definitions. Reuse functions<br>
and types from there.<br>
b) Move the ngx_http_log_module code in my own module directory and<br>
compile it only there. Reuse functions and types from there.<br>
c) Write own variable parsing system, reuse a few snippets from<br>
ngx_http_variables and ngx_http_log_module, whatever fits best.<br>
d) Use complex values and try to extend the ngx_http_core_variables<br>
array to include $body_bytes_sent and the other missing variables (I<br>
don't understand why they are not included here anyway?).<br>
e) Any better way to achieve that?<br>
<br>
I'd really appreciate your help.<br>
<br>
Regards<br>
Benjamin<br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="sentmsg?compose&To=nginx%2ddevel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://e.mail.ru/cgi-bin/link?refresh=1&check=1&cnf=4a801b&url=http%3A%2F%2Fmailman.nginx.org%2Fmailman%2Flistinfo%2Fnginx-devel&msgid=13479765690000000774" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</div>
                        
                
                <base target="_self" href="https://e.mail.ru/cgi-bin/">
        </div>

        
</div>







</div>
</blockquote>
<br></BODY></HTML>