httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sorin Manolache" <sor...@gmail.com>
Subject Re: Apache modification questions
Date Fri, 05 Sep 2008 09:04:48 GMT
On Fri, Sep 5, 2008 at 05:11, Andrej van der Zee
<andrejvanderzee@gmail.com> wrote:
> 2) I do need to "attach" to the thread/process handling the request to
> extract information just after starting and just before ending. Can I
> do this in an Apache module? I found the ap_hook_child_init() function
> but no similar exit()-function. Moreover, I need to access the request
> identifier and log to a file. Can all this be done in an Apache
> module?

child_init is not the appropriate hook for your purpose. Use
ap_hook_fixups for getting the ID and ap_hook_log_transaction for
logging.

Every module has a "register_hooks" function. There, you call the two
ap_hook functions above in order to hook your callbacks to the fixups
and log_transaction events. Next you implement the two callbacks and
that's it.

S

Mime
View raw message