On Tue, Sep 15, 2009 at 11:58 AM, William A. Rowe, Jr.
<wr...@rowe-clan.net> wrote:
> 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?
>

I would prefer to just put it into the log file like Dan did.. not
everyone uses apachectl :)

Reply via email to