[reportlab-users] Re: Tracing and Debugging support in Platypus

Henning von Bargen reportlab-users@reportlab.com
Mon, 10 Nov 2003 09:15:03 +0100


> From: "Andy Robinson" <andy@reportlab.com>
> To: <reportlab-users@reportlab.com>
> Subject: RE: [reportlab-users] Tracing and Debugging support in Platypus
> Date: Sun, 9 Nov 2003 08:55:43 -0000
> Reply-To: reportlab-users@reportlab.com
> 
> > .... I tried this before with an automatic mechanism for getting file
> > and lineno info at instance creation time if nothing was supplied. A
> > difficulty is deciding where the identity is defined.
> 
> Yes.  My plan is just to let the programmer of the app explicitly
> add the line info, or any other info they want.  It doesn't help
> to know that a Table instance caused the trouble.  It does
> help to know that it was the table containing the photograph
> of Customer #14326 in your database, which someone saved
> 400 pixels wide instead of 100.
> 
> 
> Let's generalize it a bit.  If your flowable has a TraceInfo
> object attached, the TraceInfo object gets a chance to inspect
> and modify the Exception object being handled.
> 
> Then, with RML, we add source file and line number.  With something
> else, you add whatever you want by subclassing it.
> 
> > As for logging I think that should be a separate issue.  
> 
> Yup. I guess we could pass in a logger object as optional keyword
> to go().  I like hte logging interface, but it means we need
> to define a really cut down logger class in reportlab.lib for
> people below 2.3
> 
> - Andy

I like your idea. It's very close to what I suggested a few weeks ago.
And right now I have an infinite loop while generating a report from DB
data,
where such a TraceInfo object could definitely help.

Henning