Hi !

First, I would not like to start another flame...

Now, what I would like to ask is: would anybody have something
against to adding additional functionality to the [ns_logctl]
command so it is possible to assign a regular Tcl channel
as the output for the [ns_log] command?

Like, for example:

   set chan [open /some/file.log w]
   ns_logctl pushchan $chan
   ns_log notice "This goes to chan $chan"
   set chan [ns_logctl popchan]
   close $chan

The push/pop semantic would create a stack of channels
but would take care that first one (the one opened at
the server start) is never closed (i.e. popped back).

We would need such functionality in order to controllably
redirect (during runtime) the log sink.

Before I start to code this for our app only, I just
wanted to see wether this might be useful for other
people so we can include it in the standard AS code.
Futhermore, I'm not sure if the proposed push/pop
semantics would be ok. Maybe there are some better
ways of doing this?

Any thoughts?

Cheers,
Zoran


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to