phpgroupware-developers
[Top][All Lists]
Advanced

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

Re: [phpGroupWare-developers] Asking for approval


From: Sigurd Nes
Subject: Re: [phpGroupWare-developers] Asking for approval
Date: Sat, 26 Jan 2008 19:59:56 +0100
User-agent: Thunderbird 2.0.0.9 (X11/20080114)

Chris Weiss wrote:
> On Jan 26, 2008 9:24 AM, Sigurd Nes <address@hidden> wrote:
>> We all agree that the code should run with E_NOTICES on.
>>
>> My point of view is that debugging messages are a helpful tool for 
>> developers to trace down flaws in the code ? but for the normal user in a 
>> production environment ? it should be possible to suppress this messages.
>> This is currently implemented (in our project) by checking the log_level ? 
>> if log_level is set to 'N' (which is the (new) default setting) ? the 
>> notices are printed.
>>
>> Dave's position is that notices are bugs that shouldn't be neglected or else 
>> they will pile up ? and wants a permanent setting which prints all notices 
>> what so ever.
>>
>> So what I am asking is ? would you allow the flexible alternative?
> 
> maybe i'm missing something, to me this is a php setting, are you
> talking about overriding that setting?  Our goal should be to have our
> code work clean with common distribution default settings, which
> includes notices on.  While it is common practice for production
> systems to have notices off or redirected to a log file, I don't think
> we should do any overriding, if a user makes changes or new
> applications and needs notices off for that, that's their choice and
> they can work with their host to turn them off.
> 
> 

Ah yes - there is a new error_handler in HEAD which gives gives very nice 
feedback of what went wrong and where.
have a look at 
http://svn.savannah.gnu.org/viewvc/trunk/phpgwapi/inc/functions.inc.php?revision=18363&root=phpgroupware&view=markup
Look for the functions phpgw_handle_error and phpgw_parse_backtrace.
What I am talking about is within phpgw_handle_error() when notices occurs - I 
want to keep the current code at line 229:

<snippet>
if(isset($GLOBALS['phpgw_info']['server']['log_levels']['global_level']) && 
$GLOBALS['phpgw_info']['server']['log_levels']['global_level'] == 'N')
{
echo "\n<br>" . lang('ERROR Notice: %1 in %2 at line %3', $error_msg, 
$error_file, $error_line) . "<br>\n"; //this will be commented in the final 
version
}
</snippet>

Regards

Sigurd




reply via email to

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