Skip to content

Commit

Permalink
update log level for appveyor tests
Browse files Browse the repository at this point in the history
fix missing tests after #5141
  • Loading branch information
antograssiot committed Nov 13, 2014
1 parent 0801ef0 commit 13403f2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Error/Debugger.php
Expand Up @@ -181,12 +181,12 @@ public static function dump($var, $depth = 3) {
* as well as export the variable using exportVar. By default the log is written to the debug log.
*
* @param mixed $var Variable or content to log
* @param int $level type of log to use. Defaults to LOG_DEBUG
* @param int|string $level type of log to use. Defaults to 'debug'
* @param int $depth The depth to output to. Defaults to 3.
* @return void
* @link http://book.cakephp.org/2.0/en/development/debugging.html#Debugger::log
*/
public static function log($var, $level = LOG_DEBUG, $depth = 3) {
public static function log($var, $level = 'debug', $depth = 3) {
$source = static::trace(array('start' => 1)) . "\n";
Log::write($level, "\n" . $source . static::exportVar($var, $depth));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Network/Email/Email.php
Expand Up @@ -1273,7 +1273,7 @@ protected function _logDelivery($contents) {
return;
}
$config = [
'level' => LOG_DEBUG,
'level' => 'debug',
'scope' => 'email'
];
if ($this->_profile['log'] !== true) {
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Error/DebuggerTest.php
Expand Up @@ -492,7 +492,7 @@ public function testLogDepth() {
$val = array(
'test' => array('key' => 'val')
);
Debugger::log($val, LOG_DEBUG, 0);
Debugger::log($val, 'debug', 0);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Log/LogTest.php
Expand Up @@ -250,12 +250,12 @@ public function testSelectiveLoggingByLevel() {
));

$testMessage = 'selective logging';
Log::write(LOG_WARNING, $testMessage);
Log::write('warning', $testMessage);

$this->assertFileExists(LOGS . 'eggs.log');
$this->assertFileNotExists(LOGS . 'spam.log');

Log::write(LOG_DEBUG, $testMessage);
Log::write('debug', $testMessage);
$this->assertFileExists(LOGS . 'spam.log');

$contents = file_get_contents(LOGS . 'spam.log');
Expand Down

0 comments on commit 13403f2

Please sign in to comment.