Permalink
Browse files

Add scopes to `Object::log()` signature.

  • Loading branch information...
1 parent f1b815a commit 8eb5ce410aa5419482b3e587ccc8a69b4982f77c @jadb jadb committed with markstory Feb 15, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/Cake/Core/Object.php
@@ -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 @@ 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);
}
/**

0 comments on commit 8eb5ce4

Please sign in to comment.