Path: ...!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ralf Fassel Newsgroups: comp.lang.tcl Subject: Re: a trivial and complicated problem in TCL Date: Mon, 12 Aug 2024 15:48:32 +0200 Lines: 34 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net 7xenvsra8ubhXhN4M7WLLwP7TdCeQGTOfGtdTbrEaMYoqd3lQ= Cancel-Lock: sha1:h4gotZxTLPjYFqy4v49fiz92Xz0= sha1:d3uDBR91q/uDxlSS8oUfInuqUT4= sha256:JEASRV2BB40JSQHBOFtjb7R3s0l/zFYKUEYLHZD1yxs= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Bytes: 1672 * aotto1968 | I use > | > pkg_mkIndex -verbose . {*}$libs > | to build a 'pkgIndex.tcl' file … GOOD | NOW I want to redirect the "stderr" output (-verbose) to stdout ... BAD > | I can't figure out a "trivial" solution for this simple task IN tcl. Looking at the code for pkg_mkIndex, it uses 'tclLog' for the 'verbose' output. 'tclLog' itself is defined in init.tcl, with the explicit comment # Define a log command (which can be overwritten to log errors # differently, specially when stderr is not available) if {[namespace which -command tclLog] eq ""} { proc tclLog {string} { catch {puts s $string} } } So if you redefine proc tclLog {string} { catch {puts stdout $string} } prior to invoking pkg_mkIndex, it might "just work". Haven'd tried it, so YMMV. HTH R'