Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 20150 invoked from network); 15 Sep 2009 19:00:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Sep 2009 19:00:37 -0000 Received: (qmail 81523 invoked by uid 500); 15 Sep 2009 19:00:36 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 81456 invoked by uid 500); 15 Sep 2009 19:00:36 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 81447 invoked by uid 99); 15 Sep 2009 19:00:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2009 19:00:36 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.202.165.14] (HELO smtpout09.prod.mesa1.secureserver.net) (64.202.165.14) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 15 Sep 2009 19:00:25 +0000 Received: (qmail 12773 invoked from network); 15 Sep 2009 18:59:51 -0000 Received: from unknown (76.252.112.72) by smtpout09.prod.mesa1.secureserver.net (64.202.165.14) with ESMTP; 15 Sep 2009 18:59:51 -0000 Message-ID: <4AAFE3F3.9060306@rowe-clan.net> Date: Tue, 15 Sep 2009 13:58:59 -0500 From: "William A. Rowe, Jr." User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: Logging command line at startup References: <87hbv4qbst.fsf@pobox.com> In-Reply-To: <87hbv4qbst.fsf@pobox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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?