Skip Menu |

This queue is for tickets about the POE CPAN distribution.

Report information
The Basics
Id: 1627
Status: resolved
Priority: 0/
Queue: POE

People
Owner: Nobody in particular
Requestors: RCAPUTO [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: add a log file option to the kernel trace/assert messages
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.
From: lunartear [...] ambientheory.com
[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
[guest - Mon Oct 28 06:24:38 2002]: Show quoted text
> [RCAPUTO - Mon Oct 7 22:53:46 2002]: >
> > 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.
This is a good start, but our discussion on efnet #poe concluded with sungo having plans to design a more featureful logging system. This is sungo's cue to post something about those plans so they're on record and can be discussed in pseudo-time.
Date: Mon, 28 Oct 2002 22:16:15 -0500
From: sungo <eek [...] eekeek.org>
To: via RT <bug-POE [...] rt.cpan.org>
Subject: Re: [cpan #1627] add a log file option to the kernel trace/assert messages
RT-Send-Cc:
ok. we've been talking about a generic logging interface for components in general. a nice generic api that has options to talk to syslog, to files, to stderr, etc etc. my thought is to tie internal debug messages to the same sort of interface. maybe we could structure it like syslog does. where system/kernel level errors and messages come out on a certain priority and application level messages come out on a different priority. that would make for easy filtering. whatever we do, i'd like to give some thought to the api so that we dont accidentally lock ourselves into an api that we have to spend a year on deprecating :) m.