tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich Schöbel <u...@aladyn.de>
Subject Re: Logging in web::finalizer
Date Thu, 26 Feb 2004 09:51:24 GMT
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 _not_
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 
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


Mime
View raw message