Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tclet logging -- How?

1 view
Skip to first unread message

crv...@up-link.net

unread,
Jun 9, 2007, 5:10:39 AM6/9/07
to
I've got a tclet running ok but want to use the plugin's logging
feature (log::log) to do debugging. Currently, trying to use log::log
gives the error "Invalid command name log::log". I know that the
TCL_PLUGIN_LOGWINDOW environment variable is set up properly because I
get the window with it's background logging. Is there something else I
need to do to enable it? I am using Win XP with Firefox browser and
version 3 of the plugin. The security policy is home. Thanks in
advance.

Jeff Hobbs

unread,
Jun 9, 2007, 8:40:41 PM6/9/07
to crv...@up-link.net

I believe that you just want to puts to stderr or stdout, and that
should suffice. The log::log command is actually part of the plugin
master interp's codebase.

Jeff

crv...@up-link.net

unread,
Jun 10, 2007, 1:49:37 AM6/10/07
to
>
> I believe that you just want to puts to stderr or stdout, and that
> should suffice. The log::log command is actually part of the plugin
> master interp's codebase.
>
> Jeff

I've tried puts with both stdout and stderr which resulted in an error
saying "can not find channel named 'stdout'" (or stderr whichever the
case may be).

Jeff Hobbs

unread,
Jun 10, 2007, 5:41:34 PM6/10/07
to crv...@up-link.net

I guess I need to updated the docs (as well as my memory). What you
need to do is 'package require pluglog' in your tclet and use
'pluglog::log'. It was renamed in order to not conflict with tcllib's
log module.

Jeff

crv...@up-link.net

unread,
Jun 11, 2007, 8:16:55 AM6/11/07
to
>
> I guess I need to updated the docs (as well as my memory). What you
> need to do is 'package require pluglog' in your tclet and use
> 'pluglog::log'. It was renamed in order to not conflict with tcllib's
> log module.
>
I wrote the following and executed it as a tclet:

package require pluglog
button .btn -text test -command {pluglog::log front.tcl "Log test"
WARNING}
pack .btn

Once it was running, I opened the log window and cleared the log. Then
I pressed the tclet test button. There was no responce in the log
window. Any ideas why there was no logging?

0 new messages