Add scopes to Object::log() signature.

This commit is contained in:
Jad Bitar 2013-02-15 02:48:38 +02:00 committed by mark_story
parent f1b815a9bb
commit 8eb5ce410a

View file

@ -15,6 +15,7 @@
*/
App::uses('Set', 'Utility');
App::uses('CakeLog', 'Log');
/**
* Object class provides a few generic methods used in several subclasses.
@ -151,12 +152,12 @@ class Object {
* @param integer $type Error type constant. Defined in app/Config/core.php.
* @return boolean Success of log write
*/
public function log($msg, $type = LOG_ERR) {
App::uses('CakeLog', 'Log');
public function log($msg, $type = LOG_ERR, $scope = null) {
if (!is_string($msg)) {
$msg = print_r($msg, true);
}
return CakeLog::write($type, $msg);
return CakeLog::write($type, $msg, $scope);
}
/**