From 13403f298477d54b95fe0eaa01bd110b96635f94 Mon Sep 17 00:00:00 2001 From: antograssiot Date: Thu, 13 Nov 2014 20:46:04 +0100 Subject: [PATCH] update log level for appveyor tests fix missing tests after #5141 --- src/Error/Debugger.php | 4 ++-- src/Network/Email/Email.php | 2 +- tests/TestCase/Error/DebuggerTest.php | 2 +- tests/TestCase/Log/LogTest.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Error/Debugger.php b/src/Error/Debugger.php index 42cae41d1e3..a80bd4debaf 100644 --- a/src/Error/Debugger.php +++ b/src/Error/Debugger.php @@ -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)); } diff --git a/src/Network/Email/Email.php b/src/Network/Email/Email.php index 9545e48567d..d374da93b02 100644 --- a/src/Network/Email/Email.php +++ b/src/Network/Email/Email.php @@ -1273,7 +1273,7 @@ protected function _logDelivery($contents) { return; } $config = [ - 'level' => LOG_DEBUG, + 'level' => 'debug', 'scope' => 'email' ]; if ($this->_profile['log'] !== true) { diff --git a/tests/TestCase/Error/DebuggerTest.php b/tests/TestCase/Error/DebuggerTest.php index 2c0943b34bf..57629034477 100644 --- a/tests/TestCase/Error/DebuggerTest.php +++ b/tests/TestCase/Error/DebuggerTest.php @@ -492,7 +492,7 @@ public function testLogDepth() { $val = array( 'test' => array('key' => 'val') ); - Debugger::log($val, LOG_DEBUG, 0); + Debugger::log($val, 'debug', 0); } /** diff --git a/tests/TestCase/Log/LogTest.php b/tests/TestCase/Log/LogTest.php index b8bdbbe6d96..5d93ab199b7 100644 --- a/tests/TestCase/Log/LogTest.php +++ b/tests/TestCase/Log/LogTest.php @@ -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');