Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix coding standard errors in Log/

  • Loading branch information...
commit dc2f6efe131403fc987ddca5b6b7d4b0abe741ca 1 parent 9d1e88b
Mark Story markstory authored
27 lib/Cake/Log/CakeLog.php
View
@@ -18,24 +18,24 @@
* @since CakePHP(tm) v 0.2.9
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
+
/**
* Set up error level constants to be used within the framework if they are not defined within the
* system.
*
*/
- if (!defined('LOG_WARNING')) {
- define('LOG_WARNING', 3);
- }
- if (!defined('LOG_NOTICE')) {
- define('LOG_NOTICE', 4);
- }
- if (!defined('LOG_DEBUG')) {
- define('LOG_DEBUG', 5);
- }
- if (!defined('LOG_INFO')) {
- define('LOG_INFO', 6);
- }
-
+if (!defined('LOG_WARNING')) {
+ define('LOG_WARNING', 3);
+}
+if (!defined('LOG_NOTICE')) {
+ define('LOG_NOTICE', 4);
+}
+if (!defined('LOG_DEBUG')) {
+ define('LOG_DEBUG', 5);
+}
+if (!defined('LOG_INFO')) {
+ define('LOG_INFO', 6);
+}
/**
* Logs messages to configured Log adapters. One or more adapters can be configured
@@ -205,4 +205,5 @@ public static function write($type, $message) {
}
return true;
}
+
}
4 lib/Cake/Log/CakeLogInterface.php
View
@@ -24,6 +24,7 @@
* @package Cake.Log
*/
interface CakeLogInterface {
+
/**
* Write method to handle writes being made to the Logger
*
@@ -32,4 +33,5 @@
* @return void
*/
public function write($type, $message);
-}
+
+}
3  lib/Cake/Log/Engine/FileLog.php
View
@@ -59,7 +59,7 @@ public function write($type, $message) {
$debugTypes = array('notice', 'info', 'debug');
if ($type == 'error' || $type == 'warning') {
- $filename = $this->_path . 'error.log';
+ $filename = $this->_path . 'error.log';
} elseif (in_array($type, $debugTypes)) {
$filename = $this->_path . 'debug.log';
} else {
@@ -68,4 +68,5 @@ public function write($type, $message) {
$output = date('Y-m-d H:i:s') . ' ' . ucfirst($type) . ': ' . $message . "\n";
return file_put_contents($filename, $output, FILE_APPEND);
}
+
}
Please sign in to comment.
Something went wrong with that request. Please try again.