diff options
author | Timothy Warren <tim@timshomepage.net> | 2012-05-17 14:53:07 +0200 |
---|---|---|
committer | Timothy Warren <tim@timshomepage.net> | 2012-05-17 14:53:07 +0200 |
commit | 0ab28ced4d4f20d5857fae9ec0e20452d4ac181b (patch) | |
tree | fae554725bd9b187f9b298e5702f951ac394a6d7 /system/libraries/Log.php | |
parent | d013c63462b4eaa2ac2f684b2ad498a9c4fb7dd5 (diff) | |
parent | e30b3f7afafa2c016cf78cc8bb8a457c2dbcda8c (diff) |
merge upstream
Diffstat (limited to 'system/libraries/Log.php')
-rw-r--r-- | system/libraries/Log.php | 18 |
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); |