Switch from instanceof to method_exists.

This change lets custom loggers implement scopes without inheriting from
BaseLog.
This commit is contained in:
mark_story 2013-02-14 12:33:40 -05:00
parent 3b02013f7d
commit a6441d7381

View file

@ -428,7 +428,7 @@ class CakeLog {
foreach (self::$_Collection->enabled() as $streamName) { foreach (self::$_Collection->enabled() as $streamName) {
$logger = self::$_Collection->{$streamName}; $logger = self::$_Collection->{$streamName};
$types = $scopes = $config = array(); $types = $scopes = $config = array();
if ($logger instanceof BaseLog) { if (method_exists($logger, 'config')) {
$config = $logger->config(); $config = $logger->config();
} }
if (isset($config['types'])) { if (isset($config['types'])) {