Re: Re: Basic? problem with logger not solved
| From: | Justin Patrin | Date: | Fri, 19 Aug 2005 18:12:31 +0000 |
| Subject: | Re: Re: Basic? problem with logger not solved | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20497@lists.php.net to get a copy of this message | ||
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.
If none of that helps try doign a print_r of the log object and see
what you get.
>
>
> Justin Patrin schrieb:
>
> >On 8/19/05, Sabine <phpdev@sric.de> wrote:
> >
> >
> >>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
> >>
> >>
> >>
> >
> >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());
> >}
> >
> >
> >
>
>
--
Justin Patrin