[eluser]JackU[/eluser]
I´m extended the Log class to email me and some other guys when an error occurs. But i can´t get my config to load. It´s located in the config directory and a subdir. Also i´m changing the threshold levels (in the construct). Why can´t i get my config?
('application/config/extra/appconf.php)
Code:
class MY_Log extends CI_Log {
function MY_Log()
{
parent::__construct();
$this->_levels = array('ERROR' => '1', 'INFO' => '2', 'DEBUG' => '3', 'ALL' => '4');
}
function write_log($level = 'error', $msg, $php_error = FALSE)
{
$result = parent::write_log($level, $msg, $php_error);
//Get my config with emails.
$this->ci =& get_instance();
$this->ci->load->config('extra/appconf');
echo $this->ci->config->item('sendto_emails');
}
}