Navigation Menu

Skip to content

Commit

Permalink
Renamed param $type of LogTrait::write() to $level.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Dec 10, 2013
1 parent 3bbe2aa commit 932b221
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Cake/Log/LogTrait.php
Expand Up @@ -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.