[dev] Golem logger
Michael Rubinsky
mike at theupstairsroom.com
Mon May 14 14:05:16 UTC 2007
Quoting Ben Klang <ben at alkaloid.net>:
> On Monday 14 May 2007 03:06:16 am Duck wrote:
>> The recent update of Gollem.php Version 1.208 makes Gollem unusable, if
>> logging ins disabled. (The result fo Horde::getLogger is false)
>>
> After grepping through the Horde (and a few modules') sources, I can
> only find
> one good example of getLogger(), which is the one I used to model the commit
> to Gollem. Further the phpdoc on getLogger() is missing.
>
> I can modify gollem/lib/Gollem.php to check for a return type === false. Is
> that typically how Horde signifies logging being disabled? I would like to
> distinguish between disabled logging and an error instantiating the logging.
No. Look at how both Horde::getLogger() is implemented as well as
VFS::setLogger and VFS::log(). You don't technically need to even
check your return value, as VFS::setLogger will check the $logger
parameter for you...and VFS::log() checks for the existence of the
logger before attempting to log....
Thanks,
mike
--
The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 2013 bytes
Desc: PGP Public Key
Url : http://lists.horde.org/archives/dev/attachments/20070514/20419a7c/attachment.bin
More information about the dev
mailing list