Re: Req #5480 [Fbk]: Related to debug and logging errors

From: Date: Mon, 26 Sep 2005 07:22:27 +0000
Subject: Re: Req #5480 [Fbk]: Related to debug and logging errors
References: 1 2  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-3074@lists.php.net to get a copy of this message
Yeh i like the idea of the mixed variable, so basically false no debugging at all, true you get the window debugger... or you can pass your own custom log object. I think thats ideal :) On 26 Sep 2005 07:20:13 -0000, PEAR Bug Database <pear-qa@lists.php.net> wrote: > ATTENTION! Do NOT reply to this email! > To reply, use the web interface found at > http://pear.php.net/bugs/bug.php?id=5480&edit=2 > > > ID: 5480 > Updated by: lsmith@php.net > Reported By: richard dot udo at gmail dot com > Status: Feedback > Id: 5480 > Type: Feature/Change Request > Package: LiveUser_Admin > Operating System: Any > PHP Version: 4.4.1 > New Comment: > > The way I read his feature request the idea is to also support custom > loggers that are ErrorStack compatible. However with the addErrorLog() > method we add another requirement on that custom logger. > > > Previous Comments: > ------------------------------------------------------------------------ > > [2005-09-26 03:17:41] dufuz at php dot net > > I'm in favor of kicking out the global, having a mixed param (in the > constructor), bool and object, thus we define the window object if true > is passed (false default) ... just to minimize the learning curve just > to debug, if people want something else they take the time to learn > Log, if they need quick and dirty then we provide the window solution. > > > > As to the drop addErrorLog and log property public, well seems a bit > dirty to allow people to access it straight, might mean trouble in > paradise later, like if we'd have to do some extra stuff before adding > a log object thus addErrorLog would have given us that window, so we > have to ponder that one a bit better, savvy ? > > ------------------------------------------------------------------------ > > [2005-09-23 06:21:11] lsmith at php dot net > > I agree as well .. > > > > So how should this exactly work? > > Should it be done in the constructor or in the init method? > > Should we even keep $GLOBALS['_LIVEUSER_DEBUG']? > > > > Maybe we should just have a parameter in the constructor that can > either be a boolean or a logger instance and we do not even bother with > adding the windows logger outselves? > > > > I am also not sure if we should not just make the log property public > and drop the addErrorLog() method. > > ------------------------------------------------------------------------ > > [2005-09-21 21:08:57] dufuz at php dot net > > I think you are absolutly right on that one. > > ------------------------------------------------------------------------ > > [2005-09-21 20:18:12] richard dot udo at gmail dot com > > Description: > ------------ > Hey guys... looking at the 2 functions here.... > > > http://cvs.php.net/co.php/pear/LiveUser_Admin/Admin.php?r=1.46#176 > and > > here... > > http://cvs.php.net/co.php/pear/LiveUser_Admin/Admin.php?r=1.46#176 > > you can see that when your debugging you automatically get the window > > popping up with the default logger thats been used << $winlog = > > &Log::factory('win', 'LiveUser_Admin'); >> i think that you > should be > > able to pass the default logger in the config array that would > > overwrite this one so that you could controll the way your debug > > messages are outputted.... what do you guys think? > > ------------------------------------------------------------------------ > > >

« previous php.pear.qa (#3074) next »