On Thu, 21 Jun 2001, Doug MacEachern wrote:
> On Thu, 21 Jun 2001, Stas Bekman wrote:
> > I'm trying to debug handlers from ./t/response via 'print STDERR' ,
> > but nothing ever gets to the error_log file (I did check the file
> > descriptor and it points to the correct error_log).
>
> it might be buffered. what about warn() ?
this works:
warn "warn";
this works (both print their args):
print STDERR "stderr\n";
warn "warn";
this doesn't work:
print STDERR "stderr\n";
...until the buffer is full.
this works too:
my $oldfh = select(STDERR); $| = 1; select($oldfh);
print STDERR "stderr\n";
I thought STDERR is unbuffered by default. Do you mangle with it? If so,
how come warn() has it unbuffered?
While we are on this point, it'd be nice to be able to tell the Test suite
not to delete the log files on server restart. For two reasons:
1) be able to refer to older logs
2) have the logs open via tail -f all the time
of course by default these should be disabled. May be --keep-logs, or some
other flag that might group a number of features suitable for debugging
(without gdb). In fact I suggest to use --debug for normal debug (e.g. as
a group tag for --keep-logs, raising the trace prints level to 'debug' and
more to come), whereas the current --debug should be --gdb or similar.
so to summarize my suggestion:
- s/debug/gdb/
- add --keep-logs flag (Getopts: "keep-logs")
- add --loglevel flag (Getopts: "log-level=s")
- add --debug flag (Getopts: "debug") :
+ turns --keep-logs on
+ turns --loglevel=debug
+ anything else?
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]