Welcome Guest, Not a member yet? Register   Sign In
CI 2 ignores core folder.
#11

[eluser]blacklion[/eluser]
Nah, that doesn't work either. (With or without a parent:: call in the construct)
It seems as though it will only load application/libraries/Log.php if system/libraries/Log.php doesn't exist.

I'm going to have to dig around to find out why...

Thanks for your help on this.

BL
#12

[eluser]InsiteFX[/eluser]
Did you try the autoload above, some users have said that application/libraries are not being loaded.

InsiteFX
#13

[eluser]blacklion[/eluser]
I haven't tried that but I did do a quick test with replacing & extending the session class - which worked fine! :-S

BL
#14

[eluser]InsiteFX[/eluser]
Also give this a try: not sure if it will work in the libraries folder!
Code:
class MY_Log extends CI_Log {

}

InsiteFX
#15

[eluser]InsiteFX[/eluser]
I did find this in system/core/common.php which maybe why you can not extend the CI_Log class! Because the core is loading it first!
Code:
// ------------------------------------------------------------------------

/**
* Error Logging Interface
*
* We use this as a simple mechanism to access the logging
* class and send messages to be logged.
*
* @access    public
* @return    void
*/
    function log_message($level = 'error', $message, $php_error = FALSE)
    {
        static $_log;

        if (config_item('log_threshold') == 0)
        {
            return;
        }

        $_log =& load_class('Log');
        $_log->write_log($level, $message, $php_error);
    }

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB