Skip to content
Permalink
Browse files

Renamed param $type of LogTrait::write() to $level.

  • Loading branch information...
ADmad committed Dec 10, 2013
1 parent 3bbe2aa commit 932b221a7fd1845dc6f89f96b998a52be7a84ee6
Showing with 6 additions and 7 deletions.
  1. +6 −7 Cake/Log/LogTrait.php
@@ -16,24 +16,23 @@
/**
* A trait providing an object short-cut method
* to logging.
*
*/
trait LogTrait {
/**
* Convenience method to write a message to Log. See Log::write()
* for more information on writing to logs.
*
* @param string $msg Log message
* @param integer $type Error type constant. Defined in app/Config/logging.php.
* @param string $scope The name of the log scope.
* @return boolean Success of log write
* @param string $msg Log message.
* @param integer|string $level Error level.
* @param string|array $scope The name of the log scope.
* @return boolean Success of log write.
*/
public function log($msg, $type = LOG_ERR, $scope = null) {
public function log($msg, $level = LOG_ERR, $scope = []) {
if (!is_string($msg)) {
$msg = print_r($msg, true);
}
return Log::write($type, $msg, $scope);
return Log::write($level, $msg, $scope);
}
}

0 comments on commit 932b221

Please sign in to comment.
You can’t perform that action at this time.