httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: Config files, main loop, and logging
Date Thu, 12 Apr 2001 15:46:18 GMT
On Thu, 12 Apr 2001, Victor J. Orlikowski wrote:

>  > This is most definitely over-engineering.  Just do two walks of the tree.
>  > The first sets up all the internal structures, the second actually sets up
>  > the server to run.  Bam, problems solved.  We don't need to provide full
>  > debug logs the first time through, because we do a full debug log the
>  > second time through, and it is the exact same steps.
> But, since mod_so is being processed as gets taken
> care of immediately on the first pass, Ryan. It loads the specified
> DSOs, so that their config directives can be handled, and in the
> second pass, we never do the needed logging for mod_so. We simply lose
> the messages, not log them in the second pass. And we can't very well
> make mod_so Not be EXEC_ON_READ, or else we need a *third* pass to
> enable mod_so on the second pass, and then take care of the directives
> for the DSOs on the third.
> I'm fairly convinced that some form of ordering needs to be imposed on
> how the directives are handled as the tree gets walked, if we don't
> want to lose messages from anything that logs prior to LogLevel being
> set.

Ahhhh.....  I see the problem, and the reason this used to work.
Basically, we don't store EXEC_ON_READ directives in the tree.  If we
did, this wouldn't be an issue at all.  So, what's happening:

1)  We read the file, and load the DSO's
2)  We walk the tree once
3)  We unload the DSO's
4)  We re-read the file and load the DSO's
5)  we walk the tree again.

What should happen:

1)  We read the file, and load the DSO's, storing the DSO lines in the
2)  We walk the tree once
3)  We unload the DSO's
4)  We walk the tree again, reloading the DSO's as we hit them.

The easiest way to accomplish step 4, is to assign a simple weight to
directives.  99.9% of all directives will be assigned a weight of 0, the
default.  The remaining 0.1% will have a weight of 1 or higher.  When a
directive with a higher weight is encountered, it gets stored at the front
of that line of the config tree in descending order, based on weight.

This should accomplish everything that we require.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message