From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1020 Path: news.gmane.org!not-for-mail From: Torne Wuff Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: apache2 logs -> svlogd Date: Mon, 13 Feb 2006 18:04:02 +0000 Message-ID: <20060213180402.GA30800@wolfpuppy.org.uk> References: <20060213173813.GA6585@home.power> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139853854 21919 80.91.229.2 (13 Feb 2006 18:04:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Feb 2006 18:04:14 +0000 (UTC) Original-X-From: supervision-return-1256-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Feb 13 19:04:12 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1F8i3Q-0000uQ-Fh for gcsg-supervision@gmane.org; Mon, 13 Feb 2006 19:04:04 +0100 Original-Received: (qmail 5028 invoked by uid 76); 13 Feb 2006 18:04:25 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 5021 invoked from network); 13 Feb 2006 18:04:25 -0000 Original-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20060213173813.GA6585@home.power> X-Douglas-Adams-Tribute: 42 User-Agent: Mutt/1.5.11 Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1020 Archived-At: On Mon, Feb 13 06 at 7:38:13PM +0200, Alex Efros wrote: > I've just got an idea how to send all apache2 logs to svlogd, and at > first glance this idea looks not so ugly as all other ways I've seen > before to accomplish this task. :-) Apache can do this without any external help from FIFOs etc, just use a configuration like this: ErrorLog "|/usr/bin/chpst -ulogger /usr/bin/svlogd /var/log/apache2/error" CustomLog "|/usr/bin/chpst -ulogger /usr/bin/svlogd /var/log/apache2/accesslog" combined and so on for however many logs you want in different places. These commands are run as the user that started apache (usually root) not the user that apache setuid()s to, so you can call chpst and change user. Any log string that starts with a pipe is assumed to be a binary to run. -- Torne