Skip to content

Commit

Permalink
Switch from instanceof to method_exists.
Browse files Browse the repository at this point in the history
This change lets custom loggers implement scopes without inheriting from
BaseLog.
  • Loading branch information
markstory committed Feb 14, 2013
1 parent 3b02013 commit a6441d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Log/CakeLog.php
Expand Up @@ -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'])) {
Expand Down

0 comments on commit a6441d7

Please sign in to comment.