• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI_Log override disabled by Common::log_message()

#1
[eluser]Unknown[/eluser]
Shouldn't it be $_log =& load_class('Log', 'core');

Code:
function log_message($level = 'error', $message, $php_error = FALSE)
    {
        static $_log;

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

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

instead of $_log =& load_class('Log');

Code:
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);
    }

that prevents me from loading MY_Log, because default CI_Log loads first.

#2
[eluser]Unknown[/eluser]
OK, I moved MY_Log from core to libraries. That seemed to work.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.