Permalink
Browse files

Switch from instanceof to method_exists.

This change lets custom loggers implement scopes without inheriting from
BaseLog.
  • Loading branch information...
markstory committed Feb 14, 2013
1 parent 3b02013 commit a6441d73812c373488a2c1e4246b246f581718ff
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Log/CakeLog.php
View
@@ -428,7 +428,7 @@ public static function write($type, $message, $scope = array()) {
foreach (self::$_Collection->enabled() as $streamName) {
$logger = self::$_Collection->{$streamName};
$types = $scopes = $config = array();
- if ($logger instanceof BaseLog) {
+ if (method_exists($logger, 'config')) {
$config = $logger->config();
}
if (isset($config['types'])) {

0 comments on commit a6441d7

Please sign in to comment.