Re: Log observer
| From: | Chuck Hagenbuch | Date: | Fri, 10 Aug 2001 18:45:09 +0000 |
| Subject: | Re: Log observer | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1378@lists.php.net to get a copy of this message | ||
Oy. Sorry I took so long to respond to this!
Quoting Graeme Merrall <graeme@inetix.com.au>:
> $l = Log::factory("file", "/tmp/graeme.log", "TEST");
> $l->open();
> $l->log("WO0T", LOG_INFO);
> $l->close();
>
> Am I correct in the usage?
Yup.
> Now I tried setting up an observer:
>
> $o = Log_observer::factory("file", LOG_ERR);
There's a misunderstanding here; the rest isn't really relevant. Log_file isn't
an observer type, so you're not getting an observer back from that factory
method; to be honest, without playing a bit, I'm not sure _what_ you're getting
back. :) You should be defining a subclass of Log_observer somewhere (I'm
probably going to rename Log_observer to Log_Observer and add a Log/Observer/
directory with an example class to make this clearer; for now, I'm cleaning up
the observer factory code a bit.).
That help?
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
Some fallen angels have their good reasons.