From 2eaa4074ea007cec58a802f591b4641b043213d1 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Tue, 21 Dec 2010 11:44:08 -0600 Subject: Moving system/{logs,cache} to the application directory. --- system/libraries/Log.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'system/libraries/Log.php') diff --git a/system/libraries/Log.php b/system/libraries/Log.php index 6d44cfa4b..cb160a934 100644 --- a/system/libraries/Log.php +++ b/system/libraries/Log.php @@ -26,11 +26,11 @@ */ class CI_Log { - var $log_path; - var $_threshold = 1; - var $_date_fmt = 'Y-m-d H:i:s'; - var $_enabled = TRUE; - var $_levels = array('ERROR' => '1', 'DEBUG' => '2', 'INFO' => '3', 'ALL' => '4'); + protected $_log_path; + protected $_threshold = 1; + protected $_date_fmt = 'Y-m-d H:i:s'; + protected $_enabled = TRUE; + protected $_levels = array('ERROR' => '1', 'DEBUG' => '2', 'INFO' => '3', 'ALL' => '4'); /** * Constructor @@ -39,9 +39,9 @@ class CI_Log { { $config =& get_config(); - $this->log_path = ($config['log_path'] != '') ? $config['log_path'] : BASEPATH.'logs/'; + $this->_log_path = ($config['log_path'] != '') ? $config['log_path'] : APPPATH.'logs/'; - if ( ! is_dir($this->log_path) OR ! is_really_writable($this->log_path)) + if ( ! is_dir($this->_log_path) OR ! is_really_writable($this->_log_path)) { $this->_enabled = FALSE; } @@ -64,13 +64,12 @@ class CI_Log { * * Generally this function will be called using the global log_message() function * - * @access public * @param string the error level * @param string the error message * @param bool whether the error is a native PHP error * @return bool */ - function write_log($level = 'error', $msg, $php_error = FALSE) + public function write_log($level = 'error', $msg, $php_error = FALSE) { if ($this->_enabled === FALSE) { @@ -84,7 +83,7 @@ class CI_Log { return FALSE; } - $filepath = $this->log_path.'log-'.date('Y-m-d').EXT; + $filepath = $this->_log_path.'log-'.date('Y-m-d').EXT; $message = ''; if ( ! file_exists($filepath)) -- cgit v1.2.3-24-g4f1b From 0711dc87d98ce20d3a87f7ac43d78af8fba1dca7 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Wed, 5 Jan 2011 10:49:40 -0600 Subject: Hey look, it's 2011 --- system/libraries/Log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries/Log.php') diff --git a/system/libraries/Log.php b/system/libraries/Log.php index cb160a934..fb2c5a49b 100644 --- a/system/libraries/Log.php +++ b/system/libraries/Log.php @@ -6,7 +6,7 @@ * * @package CodeIgniter * @author ExpressionEngine Dev Team - * @copyright Copyright (c) 2008 - 2010, EllisLab, Inc. + * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @link http://codeigniter.com * @since Version 1.0 -- cgit v1.2.3-24-g4f1b