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: Chris Weiss
Subject: Re: [Phpgroupware-developers] Proposal - Debug Handling
Date: Mon, 14 Jul 2003 13:56:58 +0000

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.

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


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
>





reply via email to

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