Skip to content

Commit

Permalink
Add scopes to Object::log() signature.
Browse files Browse the repository at this point in the history
  • Loading branch information
jadb authored and markstory committed Mar 2, 2013
1 parent f1b815a commit 8eb5ce4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Cake/Core/Object.php
Expand Up @@ -15,6 +15,7 @@
*/

App::uses('Set', 'Utility');
App::uses('CakeLog', 'Log');

/**
* Object class provides a few generic methods used in several subclasses.
Expand Down Expand Up @@ -151,12 +152,12 @@ protected function _stop($status = 0) {
* @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);
}

/**
Expand Down

0 comments on commit 8eb5ce4

Please sign in to comment.