On Fri, Jan 30, 2004 at 12:27:02PM -0700, jim cromie wrote:
> Tim Bunce wrote:
> 
> >On Fri, Jan 30, 2004 at 03:00:37AM -0700, jim cromie wrote:
> >
> >>This sounds like it could plug into the trace mechanism, either 
> >>increasing its
> >>leverage, simplifying its implementation, or both.
> >
> >I've long wanted the DBI to have code hooks for method call entry & exit
> >that could be used for building all sorts of funky tools.
> >
> >>And having just crept up to a line, let me cross it.  Can new DBI2 have
> >>2 logging levels under transactions ?  Anything that commits (success)
> >>logs at 1 or 2, things that rollback are logged at 5 or 6. This should
> >>help unravel anomalous behavior by automatically putting your fovea
> >>on it.
> 
> speculative logging:  The basic idea is to buffer up a log as a 
> transaction proceeds,
> and decide afterwards what details of the log you want to keep - ie emit 
> to the logging device. 
> 
> Commit/rollback is the most obvious decision point, if youve got a
> rollback, or an error, dump the log-trace since the start-transaction at 
> a high level of detail, if all went smoothly, log only at a low trace-level.

Ah, okay. No, I wouldn't add that to the DBI, but if I add hooks
for method call entry & exit that could be used to implement what
you want - but do it for all drivers.

(That reminds me, anothet component is to allow tracing to a
filehandle so a tied handle can be used, for example to gether trace
output into a string.)

Tim.

Reply via email to