phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Proposal - Debug Handling


From: Dave Hall
Subject: Re: [Phpgroupware-developers] Proposal - Debug Handling
Date: Tue, 15 Jul 2003 08:12:58 +1000

Chris Weiss <address@hidden> wrote:

> but what if you only want to debug one file or class?  a global 
> debug will spew a
> metric buttload of info when you only need the info from one class.

It would add to the fun ;)  Anyway I see your point.  Maybe there could
be a combination of flags.

$GLOBALS['phpgw_info']['flags']['debug']['default'] = int; //gloabal flag
$GLOBALS['phpgw_info']['flags']['debug'][$appname] = int;//app flag
$GLOBALS['phpgw_info']['flags']['debug']['phpgwapi'] = int;//api flag
$GLOBALS['phpgw_info']['flags']['debug']['log'] = bool; //True store in
db, False output to screen.

> 
> I'm for consistancy, but I think a single global flag is bad.

The other thing I am thinking of is allowing us to generate a full trace
for trying to pinpoint annoying bugs.  Eventually I would like to find a
nice way of controlling these falgs through the ui - instead of editing
scripts.  Maybe in the session cache.

We could have a nice admin option - generate full bug report info.  The
sysadmin could be asked to set certain flags.  Run the app in replicate
the problem.  Then go back to admin select file report.  It would grab
the log, a copy of the phpinfo output, maybe some stuff from phpsysinfo,
package it up.  Initially it could just generate a huge text file, for
them to attach on a savannah bug report, and open savannah in a new
window.  Eventually we could allow the sysadmin to add some extra info,
then have it logged automagically on savannah.

This would save us the hassle of having to ask for more info, or asking
them to turn an a stack of debug flags in various files.  There are also
security implications of this - which need to be dealt with.

Once again I have another idea, and no time to implement it anytime
soon.  Any takers?

> 
> 
> Dave Hall (address@hidden) wrote:
> >
> >Hi,
> >
> >Another one for you to comment on.  Please note with this one, 
> there is
> >a bit of work involved in it.  I will not have time to complete 
> it all
> >before I leave for Europe for a month this coming weekend.
> >
> >Debgugging
> >Debug mode is a real mess.  I have seen it implemented so many 
> different>ways.  $this->debug = bool, $this->debug = int, $DEBUG=bool,
> >$GLOBALS[$DEBUG]=bool, $DEBUG=int etc.  The handling of this is 
> also a
> >little all over the place, some code echos, some uses 
> _debug_array.  The
> >handling is a less of an issue imho.
> >
> >What I would propose is that we use
> >$GLOBALS['phpgw_info']['flags']['debug'] = int (0-5)
> >
> >This would allow a global debug mode, with more granuality.
> >
> >Here is the scale
> >0 (or undefined) - Nothing
> >1 - Only Major things
> >...
> >3 - Most stuff
> >...
> >5 - Everything (ie every db->Record array is pumped through
> >_array_debug) - rarely used
> >
> >We already have the print_debug method in common_functions, which
> >supports a level.  I think some minor changes there would make 
> this very
> >easy to implement.
> >
> >The main chage is dropping distinguishing api and app debugging 
> and also
> >using a global variable instead of a constant.
> >
> >What do people think?
> >
> >Cheers
> >
> >Dave
> >
> 
> 
> 
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
> 

Attachment: dave.hall.vcf
Description: Card for <dave.hall@mbox.com.au>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]