selective logging by scope

This commit is contained in:
Rachman Chavik 2012-05-08 19:08:56 +07:00
parent 49bc818d36
commit b71e814191

View file

@ -274,7 +274,11 @@ class CakeLog {
}
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;
}