Permalink
Browse files

selective logging by scope

  • Loading branch information...
1 parent 49bc818 commit b71e814191b8a85d4cae0cd40e2e09eba19a703d @rchavik rchavik committed May 8, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Cake/Log/CakeLog.php
View
@@ -274,7 +274,11 @@ public static function write($type, $message) {
}
foreach (self::$_Collection->enabled() as $streamName) {
$logger = self::$_Collection->{$streamName};
- $logger->write($type, $message);
+ $config = $logger->config();
+ $types = $config['types'];
+ if (empty($types) || in_array($type, $types)) {
+ $logger->write($type, $message);
+ }
}
return true;
}

0 comments on commit b71e814

Please sign in to comment.