summaryrefslogtreecommitdiffstats
path: root/system/libraries/Log.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-05-17 13:32:19 +0200
committerAndrey Andreev <narf@bofh.bg>2012-05-17 13:32:19 +0200
commit5645479c622eb36cf9869797896dc0921568c4a9 (patch)
tree7a1d0c2d4cb38f440fcc7ff1204d527ed96477cc /system/libraries/Log.php
parent92ebfb65ac044f5c2e6d88fba137253854cf1b94 (diff)
Clean up the libraries
Diffstat (limited to 'system/libraries/Log.php')
-rw-r--r--system/libraries/Log.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index c10363a2e..51ce43dc7 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -42,42 +42,42 @@ class CI_Log {
* @var string
*/
protected $_log_path;
-
+
/**
* Level of logging
*
* @var int
*/
protected $_threshold = 1;
-
+
/**
* Highest level of logging
*
* @var int
*/
protected $_threshold_max = 0;
-
+
/**
* Array of threshold levels to log
*
* @var array
*/
protected $_threshold_array = array();
-
+
/**
* Format of timestamp for log files
*
* @var string
*/
protected $_date_fmt = 'Y-m-d H:i:s';
-
+
/**
* Whether or not the logger can write to the log files
*
* @var bool
*/
protected $_enabled = TRUE;
-
+
/**
* Predefined logging levels
*
@@ -88,7 +88,7 @@ class CI_Log {
/**
* Initialize Logging class
*
- * @return void
+ * @return void
*/
public function __construct()
{
@@ -151,7 +151,7 @@ class CI_Log {
if ( ! file_exists($filepath))
{
$newfile = TRUE;
- $message .= "<"."?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n";
+ $message .= '<'."?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n";
}
if ( ! $fp = @fopen($filepath, FOPEN_WRITE_CREATE))
@@ -159,7 +159,7 @@ class CI_Log {
return FALSE;
}
- $message .= $level.' '.(($level == 'INFO') ? ' -' : '-').' '.date($this->_date_fmt). ' --> '.$msg."\n";
+ $message .= $level.' '.($level === 'INFO' ? ' -' : '-').' '.date($this->_date_fmt).' --> '.$msg."\n";
flock($fp, LOCK_EX);
fwrite($fp, $message);