Re: Re: Basic? problem with logger not solved
| From: | Sabine | Date: | Fri, 19 Aug 2005 18:26:07 +0000 |
| Subject: | Re: Re: Basic? problem with logger not solved | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20498@lists.php.net to get a copy of this message | ||
Hello Justin,
Justin Patrin schrieb:
On 8/19/05, Sabine <phpdev@sric.de> wrote:Thanks, Justin, for your answer. I did as you suggested. The problem remains the same.Did you try for the second problem as well? That one seems like a clear-cut case of an error being used as a normal object. I'm not quite sure what you mean with that question. If the class can not be instantiated it returns false.
If none of that helps try doign a print_r of the log object and see what you get. log_file Object ( [opened] => [ident] => wat dat? [listeners] => Array ( ) [filename] => ./../files/logtest.txt [fp] => )after instantiation. After $logger->open(); the object is: log_file Object ( [opened] => 1 [ident] => wat dat? [listeners] => Array ( ) [filename] => ./../files/logtest.txt [fp] => Resource id #6 ) It seems as if I get te undefined function error in every case I call a function, which itself calls upto(). Best regards Sabine
Justin Patrin schrieb:On 8/19/05, Sabine <phpdev@sric.de> wrote:Nearly any time you get an undefined function error it's because you're not checking for errors. I'm 99% sure this is your problem. Put this before any use of the log variable: if (PEAR::isError($logger)) { die($logger->getMessage()); }With the Log-package I must do something totally wrong. I think it's a basic problem, but I'm blind to it. Perhaps you see it on the first glance? With every logger I get "Call to undefined function"-messages. <script> require_once('./inc_pear.php'); require_once('PEAR.php'); require_once('Log.php'); $conf = array('title' => 'Sample Log Output'); $logger = &Log::singleton('win', 'LogWindow', 'ident', $conf); </script> --> Fatal error: Call to undefined function: upto() in /mypearpath/PEAR/Log/win.php on line 78