Return-Path: Delivered-To: apmail-tcl-websh-dev-archive@www.apache.org Received: (qmail 80157 invoked from network); 26 Feb 2004 09:51:12 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 26 Feb 2004 09:51:12 -0000 Received: (qmail 19127 invoked by uid 500); 26 Feb 2004 09:50:47 -0000 Delivered-To: apmail-tcl-websh-dev-archive@tcl.apache.org Received: (qmail 19103 invoked by uid 500); 26 Feb 2004 09:50:47 -0000 Mailing-List: contact websh-dev-help@tcl.apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list websh-dev@tcl.apache.org Received: (qmail 19073 invoked from network); 26 Feb 2004 09:50:47 -0000 Received: from unknown (HELO p10074274.pureserver.de) (217.160.78.200) by daedalus.apache.org with SMTP; 26 Feb 2004 09:50:47 -0000 Received: from lion (dialin-212-144-032-115.arcor-ip.net [212.144.32.115]) by p10074274.pureserver.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id i1Q9owX27748; Thu, 26 Feb 2004 10:50:58 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Ulrich =?iso-8859-1?q?Sch=F6bel?= Organization: Unix Service To: Ronnie Brunner , websh-dev@tcl.apache.org Subject: Re: Logging in web::finalizer Date: Thu, 26 Feb 2004 10:51:24 +0100 User-Agent: KMail/1.4.3 References: <20040225222933.GA14603@netcetera.ch> In-Reply-To: <20040225222933.GA14603@netcetera.ch> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200402261051.24604.usus@aladyn.de> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Am Mittwoch, 25. Februar 2004 23:29 schrieb Ronnie Brunner: > Hi Websh hackers > > I just tried to figure out, why logging in web::finalizer (mod_websh) > doesn't work. The answer is simple: there is a proc > web::ap::perReqInit and a proc web::ap::ReqCleanup in mod_websh that > reset some stuff for different requests. As it is now, > web::ap::perReqCleanup deletes all log destinations and log filters > this is to prevent that subsequent requests don't create multiple > destinations and filters (seems to make sense). -> In web::finalizer > there are no filters and destinations anymore (because this is always > called after the request has long finished (i.e. also after > web::ap::reqCleanup) Hi Ronnie, as you can see from the short example I mailed you, I redefined the web::ap::perReqCleanup proc to do nothing. This does allow me to define the log destination and filters in the initializer, but it does _n= ot_ enable logging in the finalizer. It's obviously not enough to move/remove this proc. I'm clearly in favour of solution 4, but i'm afraid this alone won't fix = the=20 bug. Best regards Ulrich > > Now I've got some solutions and I'd like to here some comments about > which one to implement: > > 1. do nothing and tell everyone who has that problem to repeat the > needed web::logdest and web::logfilter commands in web::finalizer > (draw back: not really that transparent) > > 2. also do nothing and tell people to overwrite web::ap::perReqCleanup > (draw back: not too transparent either) > > 3. put [web::logdest delete] and [web::logfilter delete] in > web::ap::perReqInit instead of web::ap::perReqCleanup > (draw back: only setting log destinations and filters in > web::initializer will not work. But then, that doesn't work either > currently ;-) > > 4. remove the [web::logdest delete] and [web::logfilter delete] from > web::ap::perReqCleanup and change the implementation of web::logdest > and web::logfilter so that subsequent calls with the same arguments > will not create a new logdest or logfilter respectively. > The clear advantage would be that you can define your logging stuff in > web::initializer, but you also don't have problems if you define them > in your per request code. In addition, there is no need to delete them > after a request has finished -> they will still be available in > web::finalizer > (draw back: more work than the others) > > > All in all I tend to favor the last approach, but it's more work and a > bigger change. Is compatibility an issue? Does anyone see a porblem? > > Any comments? > > Thx > Ronnie > ---------------------------------------------------------------------- > Ronnie Brunner ronnie.brunner@netcetera.ch > Netcetera AG, 8040 Zuerich phone +41 1 247 79 79 fax +41 1 247 70 75 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org > For additional commands, e-mail: websh-dev-help@tcl.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org For additional commands, e-mail: websh-dev-help@tcl.apache.org