You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2006/06/21 18:58:01 UTC

Re: hook call tracing [was: debug apache]

Alexander Lazic wrote:
> On Sam 17.06.2006 00:54, Ruediger Pluem wrote:
>>
>> On 06/16/2006 10:28 PM, Alexander Lazic wrote:
>>> Any opinion from the developer, to this issue?!
>>>
>>> On Don 01.06.2006 08:14, Alexander Lazic wrote:
>>>
>>>>
>>>> Is it possible to get a logentry from the hooks in apache to see the
>>>> flow of a request?
>>>>
>>>> eg:
>>>>
>>>> $REQUEST accepted on $FD
> 
> [snipp]
> 
>> From my current point of view the answer is: No, this is not possible
>> out of the box.
>> It may be possible if you modify the hook macros.
> 
> And do you think that the developer would accept a patch for apache 2.x
> and would apply it?

Just to be clear; there is no patch (yet) to review?

n quick observations;

  * I've built this myself, it was non trivial so never submitted for
    consideration, and I didn't like my own hack anyways.

  * There's some context missing from the hook structure that would
    be necessary to do this.  Most importantly, the name of the target
    for the hook's call.  This could be the source file or the name of
    the module it resides in or both.

  * I was never really happy with just 'we called X'.  It wasn't worth
    presenting to the list until there's some method to decode the args,
    potentially args in -> args out.  -OR-...

  * Rather than args, what about a hook formatter function that could
    display whatever -relevant- fields (e.g. uri + filename during the
    translation parsing hook, user and pseudo-passwd during auth) that
    usually apply to the intended purpose of the hook.

  * To save hassles, there should be an empty formatter by default until
    various hooks learn to format.

  * We want to record that the module accepted, declined or returned an
    explicit status from it's hook call.

This is definately useful for module developers, and should be added.

It seems our hackathon in Dublin is the best place to kick around ideas?
Actually, Nick and I will probably kick this around Saturday or Sunday
since he's presenting to that crowd (module authors) on Monday.

(And to the original poster, your recent comments are demotivating; you
are generally guarenteed not to have your problem solved by guilting devs
into writing a patch for you, and even if this patch happens, don't expect
a similar reaction to your future posts.  Write it, pay someone to do it
for you, or keep your tone polite but insistent that it benefits the entire
community.  Remember the developers scratch their own itch, not yours, owe
you, personally, nothing.)

Bill

Re: hook call tracing [was: debug apache]

Posted by Alexander Lazic <al...@none.at>.
On Mit 21.06.2006 11:58, William A. Rowe, Jr. wrote:
>
>(And to the original poster, your recent comments are demotivating; you
>are generally guarenteed not to have your problem solved by guilting
>devs into writing a patch for you, and even if this patch happens,
>don't expect a similar reaction to your future posts.  Write it, pay
>someone to do it for you, or keep your tone polite but insistent that
>it benefits the entire community.  Remember the developers scratch
>their own itch, not yours, owe you, personally, nothing.)

You are right, the reason for my *hopless* tone was that i have try a
long time to find a reason why a configuration not work and there was no
option to get some infos from the webserver when what directive/module
catch the request.

I hope you and the other developer accept my apology and understand a
little bit that for some user/admins it is very hard to find out why the
webserver do what he do without a message from the webserver.

I have try to dig into the source but i haven't *like* it and i have try
to search in google for a explanation for *developers* but i haven't
found a helpfull link except http://httpd.apache.org/docs/2.0/developer/
:-(

The dependeny to the apr and how the httpd interacts with this lib isn't
very well documented, from my point of view, imho.

I have found in the sources the 'if (getenv("SHOW_HOOKS"))' but a
APR_*HOOK* doc not :-(

I understand that the most of the developer make the work for
*apache.org in there freetime and therefore that some parts came out
later into the public world ;-)

Well thank you for you interest an sorry for my expression of my
frustation with the httpd, i have make my decision and look further into
the future of this project.

Regards

Alex

Re: hook call tracing [was: debug apache]

Posted by Brian Akins <br...@turner.com>.
William A. Rowe, Jr. wrote:

> This is definately useful for module developers, and should be added.

+1.  it is also useful, when you have strange things happening to 
production web servers.  I, too, did a rather ugly hack that shouwed the 
current hook using mod_status hook and it has come in handy.  It is 
however very ugly.

-- 
Brian Akins
Lead Systems Engineer
CNN Internet Technologies