[RCAPUTO - Mon Oct 7 22:53:46 2002]:
Show quoted text> POE's internal trace and assertion messages are currently dumped to
> STDERR. This often gets in the way of real-life debugging. Add an
> option, perhaps sub POE::Kernel::LOG_FILE () { "filename"} that
> redirects log messages to a file.
I was doodling lastnight.. here may be an acceptable fix for this.
synthetic$ diff Kernel_orig.pm Kernel_patch.pm
234a235,250
Show quoted text> # Option to pipe assert/trace messages to a logfile.
>
> if ( &TRACE_DEFAULT || &ASSERT_DEFAULT ) {
> my $tal_file = $ENV{POE_LOG_FILE} || 'trace_assert.log';
> defined &LOG_FILE or eval "sub LOG_FILE () { '$tal_file' }";
> warn $@ if $@;
> my $tal_default = 0;
> $tal_default++ if defined $ENV{POE_TRACE_ASSERT_LOG};
>
> defined &TRACE_ASSERT_LOG or eval "sub TRACE_ASSERT_LOG ()
{$tal_default}";
Show quoted text> if (&TRACE_ASSERT_LOG) {
> open STDERR, ">" . &LOG_FILE or croak "Can't redirect STDERR";
> }
> }
> # end option to pipe assert/trace messages.
>
tarball with a test program and a modified Kernel.pm
is at
http://www.ambientheory.com:1010/kern_ta_log.tgz