httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: Logging command line at startup
Date Tue, 15 Sep 2009 18:58:59 GMT
Dan Poirier wrote:
> I'd like to log the server command line and server root at startup.
> 
> The reason is: sometimes when debugging a problem I'm given some logs
> and a directory full of various revisions of the server configuration
> file, and can only guess which of the configuration files was actually
> being used.
> 
> Logging the path to the configuration file would be complicated, since
> when it's opened, we don't know where the logs are going to go yet, and
> we don't save the configuration file path for later use.
> 
> But with the command line and the server root, it won't be hard to tell
> which configuration file got used.
> 
> I've put a first pass at implementing this at
> http://people.apache.org/~poirier/log_command_line_at_startup.patch.txt
> and welcome comments.

I do something similar in my local startup script; alongside httpd.pid,
the httpd.last is written with the command invoked (as a shell activity).

This allows a hard-restart with the precise args and flags the user passed
via the startup script command.

If you like, Jim or I could propose that change to apachectl; it wouldn't
be in the error.log, but might solve half the battle?

Mime
View raw message