phpgroupware-developers
[Top][All Lists]
Advanced

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

[Phpgroupware-developers] Proposal - Debug Handling


From: Dave Hall
Subject: [Phpgroupware-developers] Proposal - Debug Handling
Date: Mon, 14 Jul 2003 17:46:41 +1000

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

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


reply via email to

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