diff options
author | Chris Passas <cpassas@gmail.com> | 2013-02-13 17:51:30 +0100 |
---|---|---|
committer | Chris Passas <cpassas@gmail.com> | 2013-02-13 17:51:30 +0100 |
commit | aae91a45e27cb11e09b22bf9be04a7da9f6ff20b (patch) | |
tree | 5a4c339c0ddff6fc832221370eaf122c61cace1c /system/core | |
parent | c2268711a27809575f82b21e64fde6cd953ef7f9 (diff) |
Update system/core/Log.php
Updated Log.php so that a developer can extend it and change the log file extension.
It makes sense to default to .php when logs are in the public web folder. It would be nice if a developer moves the log file path we have the option to use a standard extension like .log
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Log.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/system/core/Log.php b/system/core/Log.php index f5d091e14..3b0a9213d 100644 --- a/system/core/Log.php +++ b/system/core/Log.php @@ -71,6 +71,13 @@ class CI_Log { * @var string */ protected $_date_fmt = 'Y-m-d H:i:s'; + + /** + * Log file extension + * + * @var string + */ + protected $_log_ext = 'php'; /** * Whether or not the logger can write to the log files @@ -147,7 +154,7 @@ class CI_Log { return FALSE; } - $filepath = $this->_log_path.'log-'.date('Y-m-d').'.php'; + $filepath = $this->_log_path.'log-'.date('Y-m-d').'.'.$this->_log_ext; $message = ''; if ( ! file_exists($filepath)) @@ -179,4 +186,4 @@ class CI_Log { } /* End of file Log.php */ -/* Location: ./system/core/Log.php */
\ No newline at end of file +/* Location: ./system/core/Log.php */ |