Re: Request For Comments: Log2

From: Date: Mon, 14 Sep 2009 12:54:39 +0000
Subject: Re: Request For Comments: Log2
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-52815@lists.php.net to get a copy of this message
David Jean Louis wrote: >> * The shortcut methods were intentionally excluded. I consulted with a >> number of developers who felt it was silly to have eight methods that >> were essentially identical, for the sake of typing less. > > Fair enough, but IMHO this is relevant for a logging package, if you > make an intensive usage of the Log class, typing: > $log->warn('some message'); > instead of: > $log->log('some message', Log::WARNING); > can help you to save some precious time. function __call($method, $var) { switch ($method) { case 'warn' : $this->log($var, self::WARNING); //etc. } } Greg

« previous php.pear.dev (#52815) next »