Browse Source

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

Jad Bitar 13 years ago
parent
commit
8eb5ce410a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      lib/Cake/Core/Object.php

+ 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 @@ 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);
 	}
 
 /**