diff options
40 files changed, 54 insertions, 52 deletions
diff --git a/system/core/Config.php b/system/core/Config.php index d5ce91f48..3828fae65 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -72,6 +72,8 @@ class CI_Config { */ public $_config_paths = array(APPPATH); + // -------------------------------------------------------------------- + /** * Class constructor * @@ -82,7 +84,6 @@ class CI_Config { public function __construct() { $this->config =& get_config(); - log_message('debug', 'Config Class Initialized'); // Set the base_url automatically if none was provided if (empty($this->config['base_url'])) @@ -101,6 +102,8 @@ class CI_Config { $this->set_item('base_url', $base_url); } + + log_message('info', 'Config Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/core/Controller.php b/system/core/Controller.php index 06005b058..4ad10fc2f 100644 --- a/system/core/Controller.php +++ b/system/core/Controller.php @@ -77,7 +77,7 @@ class CI_Controller { $this->load =& load_class('Loader', 'core'); $this->load->initialize(); - log_message('debug', 'Controller Class Initialized'); + log_message('info', 'Controller Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/core/Hooks.php b/system/core/Hooks.php index 429d6bceb..a55b38aaa 100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php @@ -88,8 +88,7 @@ class CI_Hooks { public function __construct() { $CFG =& load_class('Config', 'core'); - - log_message('debug', 'Hooks Class Initialized'); + log_message('info', 'Hooks Class Initialized'); // If hooks are not enabled in the config file // there is nothing else to do diff --git a/system/core/Input.php b/system/core/Input.php index 358417c79..1816a2014 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -123,8 +123,6 @@ class CI_Input { */ public function __construct() { - log_message('debug', 'Input Class Initialized'); - $this->_allow_get_array = (config_item('allow_get_array') === TRUE); $this->_enable_xss = (config_item('global_xss_filtering') === TRUE); $this->_enable_csrf = (config_item('csrf_protection') === TRUE); @@ -140,6 +138,8 @@ class CI_Input { // Sanitize global arrays $this->_sanitize_globals(); + + log_message('info', 'Input Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/core/Lang.php b/system/core/Lang.php index fe1dc1a9d..3213478ca 100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -69,7 +69,7 @@ class CI_Lang { */ public function __construct() { - log_message('debug', 'Language Class Initialized'); + log_message('info', 'Language Class Initialized'); } // -------------------------------------------------------------------- @@ -172,7 +172,7 @@ class CI_Lang { $this->is_loaded[$langfile] = $idiom; $this->language = array_merge($this->language, $lang); - log_message('debug', 'Language file loaded: language/'.$idiom.'/'.$langfile); + log_message('info', 'Language file loaded: language/'.$idiom.'/'.$langfile); return TRUE; } diff --git a/system/core/Loader.php b/system/core/Loader.php index d930dbfa8..cce1b1277 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -138,7 +138,7 @@ class CI_Loader { $this->_ci_ob_level = ob_get_level(); $this->_ci_classes =& is_loaded(); - log_message('debug', 'Loader Class Initialized'); + log_message('info', 'Loader Class Initialized'); } // -------------------------------------------------------------------- @@ -577,7 +577,7 @@ class CI_Loader { include_once($base_helper); $this->_ci_helpers[$helper] = TRUE; - log_message('debug', 'Helper loaded: '.$helper); + log_message('info', 'Helper loaded: '.$helper); continue; } @@ -589,7 +589,7 @@ class CI_Loader { include_once($path.'helpers/'.$helper.'.php'); $this->_ci_helpers[$helper] = TRUE; - log_message('debug', 'Helper loaded: '.$helper); + log_message('info', 'Helper loaded: '.$helper); break; } } @@ -914,7 +914,7 @@ class CI_Loader { include($_ci_path); // include() vs include_once() allows for multiple views with the same name } - log_message('debug', 'File loaded: '.$_ci_path); + log_message('info', 'File loaded: '.$_ci_path); // Return the file data if requested if ($_ci_return === TRUE) diff --git a/system/core/Model.php b/system/core/Model.php index 1cb00f742..d1487b611 100644 --- a/system/core/Model.php +++ b/system/core/Model.php @@ -55,7 +55,7 @@ class CI_Model { */ public function __construct() { - log_message('debug', 'Model Class Initialized'); + log_message('info', 'Model Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/core/Output.php b/system/core/Output.php index beac6b377..6b9a33d31 100644 --- a/system/core/Output.php +++ b/system/core/Output.php @@ -141,7 +141,7 @@ class CI_Output { // Get mime types for later $this->mimes =& get_mimes(); - log_message('debug', 'Output Class Initialized'); + log_message('info', 'Output Class Initialized'); } // -------------------------------------------------------------------- @@ -491,7 +491,7 @@ class CI_Output { } echo $output; - log_message('debug', 'Final output sent to browser'); + log_message('info', 'Final output sent to browser'); log_message('debug', 'Total execution time: '.$elapsed); return; } @@ -528,7 +528,7 @@ class CI_Output { echo $output; // Send it to the browser! } - log_message('debug', 'Final output sent to browser'); + log_message('info', 'Final output sent to browser'); log_message('debug', 'Total execution time: '.$elapsed); } diff --git a/system/core/Router.php b/system/core/Router.php index b21335fc2..c7acad074 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -147,7 +147,7 @@ class CI_Router { } } - log_message('debug', 'Router Class Initialized'); + log_message('info', 'Router Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/core/Security.php b/system/core/Security.php index 2bf0f6284..4f5d9540d 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -192,7 +192,7 @@ class CI_Security { $this->charset = strtoupper(config_item('charset')); - log_message('debug', 'Security Class Initialized'); + log_message('info', 'Security Class Initialized'); } // -------------------------------------------------------------------- @@ -244,7 +244,7 @@ class CI_Security { $this->_csrf_set_hash(); $this->csrf_set_cookie(); - log_message('debug', 'CSRF token verified'); + log_message('info', 'CSRF token verified'); return $this; } @@ -275,7 +275,7 @@ class CI_Security { $secure_cookie, config_item('cookie_httponly') ); - log_message('debug', 'CRSF cookie Set'); + log_message('info', 'CRSF cookie sent'); return $this; } @@ -533,7 +533,6 @@ class CI_Security { return ($str === $converted_string); } - log_message('debug', 'XSS Filtering completed'); return $str; } diff --git a/system/core/URI.php b/system/core/URI.php index 39d1a8f30..a249e5733 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -140,7 +140,7 @@ class CI_URI { } } - log_message('debug', 'URI Class Initialized'); + log_message('info', 'URI Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/core/Utf8.php b/system/core/Utf8.php index bca95c206..2611a6bb6 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -74,7 +74,7 @@ class CI_Utf8 { log_message('debug', 'UTF-8 Support Disabled'); } - log_message('debug', 'Utf8 Class Initialized'); + log_message('info', 'Utf8 Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 185f930bf..11886757f 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -381,7 +381,7 @@ abstract class CI_DB_driver { } } - log_message('debug', 'Database Driver Class Initialized'); + log_message('info', 'Database Driver Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 4ca980810..41f9bf5e2 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -167,7 +167,7 @@ abstract class CI_DB_forge { public function __construct(&$db) { $this->db =& $db; - log_message('debug', 'Database Forge Class Initialized'); + log_message('info', 'Database Forge Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php index 963080fbb..4bf94d4dc 100644 --- a/system/database/DB_utility.php +++ b/system/database/DB_utility.php @@ -87,7 +87,7 @@ abstract class CI_DB_utility { public function __construct(&$db) { $this->db =& $db; - log_message('debug', 'Database Utility Class Initialized'); + log_message('info', 'Database Utility Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php index e6ca225bf..fcca163a5 100644 --- a/system/libraries/Calendar.php +++ b/system/libraries/Calendar.php @@ -138,7 +138,7 @@ class CI_Calendar { empty($config) OR $this->initialize($config); - log_message('debug', 'Calendar Class Initialized'); + log_message('info', 'Calendar Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Cart.php b/system/libraries/Cart.php index a0fe1053d..2fffd9a76 100644 --- a/system/libraries/Cart.php +++ b/system/libraries/Cart.php @@ -115,7 +115,7 @@ class CI_Cart { $this->_cart_contents = array('cart_total' => 0, 'total_items' => 0); } - log_message('debug', 'Cart Class Initialized'); + log_message('info', 'Cart Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Email.php b/system/libraries/Email.php index c042aaade..f8a89c344 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -421,7 +421,7 @@ class CI_Email { $this->_safe_mode = ( ! is_php('5.4') && ini_get('safe_mode')); $this->charset = strtoupper($this->charset); - log_message('debug', 'Email Class Initialized'); + log_message('info', 'Email Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php index 45b3027eb..f527a9943 100644 --- a/system/libraries/Encrypt.php +++ b/system/libraries/Encrypt.php @@ -97,7 +97,7 @@ class CI_Encrypt { show_error('The Encrypt library requires the Mcrypt extension.'); } - log_message('debug', 'Encrypt Class Initialized'); + log_message('info', 'Encrypt Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index ef67b4cd5..95b183a3a 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -171,7 +171,7 @@ class CI_Encryption { $this->_key = $key; } - log_message('debug', 'Encryption Class Initialized'); + log_message('info', 'Encryption Class Initialized'); } // -------------------------------------------------------------------- @@ -268,7 +268,7 @@ class CI_Encryption { if ($this->_handle = mcrypt_module_open($this->_cipher, '', $this->_mode, '')) { - log_message('debug', 'Encryption: MCrypt cipher '.strtoupper($this->_cipher).' initialized in '.strtoupper($this->_mode).' mode.'); + log_message('info', 'Encryption: MCrypt cipher '.strtoupper($this->_cipher).' initialized in '.strtoupper($this->_mode).' mode.'); } else { @@ -322,7 +322,7 @@ class CI_Encryption { else { $this->_handle = $handle; - log_message('debug', 'Encryption: OpenSSL initialized with method '.strtoupper($handle).'.'); + log_message('info', 'Encryption: OpenSSL initialized with method '.strtoupper($handle).'.'); } } } diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index f731544b1..7c9561c07 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -146,7 +146,7 @@ class CI_Form_validation { // Automatically load the form helper $this->CI->load->helper('form'); - log_message('debug', 'Form Validation Class Initialized'); + log_message('info', 'Form Validation Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php index f6279cfc5..4794d75c1 100644 --- a/system/libraries/Ftp.php +++ b/system/libraries/Ftp.php @@ -112,7 +112,7 @@ class CI_FTP { public function __construct($config = array()) { empty($config) OR $this->initialize($config); - log_message('debug', 'FTP Class Initialized'); + log_message('info', 'FTP Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 529532e60..9ad0dd5b6 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -392,7 +392,7 @@ class CI_Image_lib { $this->initialize($props); } - log_message('debug', 'Image Lib Class Initialized'); + log_message('info', 'Image Lib Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php index 94586c069..f0ffa142b 100644 --- a/system/libraries/Javascript.php +++ b/system/libraries/Javascript.php @@ -85,7 +85,7 @@ class CI_Javascript { // make js to refer to current library $this->js =& $this->CI->$js_library_driver; - log_message('debug', 'Javascript Class Initialized and loaded. Driver used: '.$js_library_driver); + log_message('info', 'Javascript Class Initialized and loaded. Driver used: '.$js_library_driver); } // -------------------------------------------------------------------- diff --git a/system/libraries/Javascript/Jquery.php b/system/libraries/Javascript/Jquery.php index 1c6331f6b..a44a9f5d6 100644 --- a/system/libraries/Javascript/Jquery.php +++ b/system/libraries/Javascript/Jquery.php @@ -115,7 +115,7 @@ class CI_Jquery extends CI_Javascript { $this->script(); } - log_message('debug', 'Jquery Class Initialized'); + log_message('info', 'Jquery Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index f46d45f5a..a2dce1371 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -126,7 +126,7 @@ class CI_Migration { $this->{'_'.$key} = $val; } - log_message('debug', 'Migrations class initialized'); + log_message('info', 'Migrations Class Initialized'); // Are they trying to use migrations while it is disabled? if ($this->_migration_enabled !== TRUE) diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 1081fbec7..6c8366435 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -333,7 +333,7 @@ class CI_Pagination { } $this->initialize($params); - log_message('debug', 'Pagination Class Initialized'); + log_message('info', 'Pagination Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index 5a2024955..418dd38d6 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -79,6 +79,7 @@ class CI_Parser { public function __construct() { $this->CI =& get_instance(); + log_message('info', 'Parser Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 9a4e833cc..d3f5d8de2 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -116,6 +116,7 @@ class CI_Profiler { } $this->set_sections($config); + log_message('info', 'Profiler Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 5c61002a6..bc4a5ca1c 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -174,7 +174,7 @@ class CI_Session { $this->_ci_init_vars(); - log_message('debug', "Session: Class initialized using '".$this->_driver."' driver."); + log_message('info', "Session: Class initialized using '".$this->_driver."' driver."); } // ------------------------------------------------------------------------ diff --git a/system/libraries/Table.php b/system/libraries/Table.php index 118536f88..a1496a514 100644 --- a/system/libraries/Table.php +++ b/system/libraries/Table.php @@ -120,7 +120,7 @@ class CI_Table { $this->template[$key] = $val; } - log_message('debug', 'Table Class Initialized'); + log_message('info', 'Table Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php index 3284923fd..9992fb417 100644 --- a/system/libraries/Trackback.php +++ b/system/libraries/Trackback.php @@ -103,7 +103,7 @@ class CI_Trackback { */ public function __construct() { - log_message('debug', 'Trackback Class Initialized'); + log_message('info', 'Trackback Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php index 6137673c0..0b8bcd7c4 100644 --- a/system/libraries/Unit_test.php +++ b/system/libraries/Unit_test.php @@ -111,7 +111,7 @@ class CI_Unit_test { */ public function __construct() { - log_message('debug', 'Unit Testing Class Initialized'); + log_message('info', 'Unit Testing Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index e022c43d4..3b0e044ae 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -296,7 +296,7 @@ class CI_Upload { $this->_mimes =& get_mimes(); $this->_CI =& get_instance(); - log_message('debug', 'Upload Class Initialized'); + log_message('info', 'Upload Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php index 04e1a59ba..242bedbb6 100644 --- a/system/libraries/User_agent.php +++ b/system/libraries/User_agent.php @@ -183,7 +183,7 @@ class CI_User_agent { $this->_compile_data(); } - log_message('debug', 'User Agent Class Initialized'); + log_message('info', 'User Agent Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php index 5ecebaf6d..9f5e20468 100644 --- a/system/libraries/Xmlrpc.php +++ b/system/libraries/Xmlrpc.php @@ -314,7 +314,7 @@ class CI_Xmlrpc { $this->initialize($config); - log_message('debug', 'XML-RPC Class Initialized'); + log_message('info', 'XML-RPC Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php index f786b2323..2ab862737 100644 --- a/system/libraries/Xmlrpcs.php +++ b/system/libraries/Xmlrpcs.php @@ -104,7 +104,7 @@ class CI_Xmlrpcs extends CI_Xmlrpc { $this->methods = array_merge($this->methods, $config['functions']); } - log_message('debug', 'XML-RPC Server Class Initialized'); + log_message('info', 'XML-RPC Server Class Initialized'); } // -------------------------------------------------------------------- diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index cee5d8d76..555e9aedf 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -113,7 +113,7 @@ class CI_Zip { public function __construct() { $this->now = time(); - log_message('debug', 'Zip Compression Class Initialized'); + log_message('info', 'Zip Compression Class Initialized'); } // -------------------------------------------------------------------- diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 73a183b6c..2a61dd2bd 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -58,6 +58,7 @@ Release Date: Not Released - Added support for turning newline standardization on/off via ``$config['standardize_newlines']`` and set it to FALSE by default. - Added configuration setting ``$config['composer_autoload']`` to enable loading of a `Composer <https://getcomposer.org/>`_ auto-loader. - Removed the automatic conversion of 'programmatic characters' to HTML entities from the :doc:`URI Library <libraries/uri>`. + - Changed log messages that say a class or file was loaded to "info" level instead of "debug", so that they don't pollute log files when ``$config['log_threshold']`` is set to 2 (debug). - Helpers diff --git a/user_guide_src/source/general/errors.rst b/user_guide_src/source/general/errors.rst index 26c26bea1..721c78ca7 100644 --- a/user_guide_src/source/general/errors.rst +++ b/user_guide_src/source/general/errors.rst @@ -101,9 +101,7 @@ There are three message types: example, if a class has been initialized, you could log this as debugging info. #. Informational Messages. These are the lowest priority messages, - simply giving information regarding some process. CodeIgniter doesn't - natively generate any info messages but you may want to in your - application. + simply giving information regarding some process. .. note:: In order for the log file to actually be written, the *logs* directory must be writable. In addition, you must set the "threshold" |