Welcome Guest, Not a member yet? Register   Sign In
Codeigniter logging
#1

[eluser]sqwk[/eluser]
At the moment CI lets you specify a logging level. 0 is off, 1 to 3 are different subsets and 4 shows all messages.

Is it possible to tell Codigniter to log errors and informational messages but not debug messages? (Essentially setting the log threshold to an array?)
#2

[eluser]WanWizard[/eluser]
Extend the Log library, and alter the sequence of the levels:
Code:
var $_levels    = array('ERROR' => '1', 'DEBUG' => '2',  'INFO' => '3', 'ALL' => '4');

The rule is that the log_threshold set, and all values lower, are written to the logfile. So if you want ERROR and INFO, but not DEBUG, change the above to
Code:
var $_levels    = array('ERROR' => '1', 'INFO' => '2',  'DEBUG' => '3', 'ALL' => '4');
and set the log_threshold to 2.




Theme © iAndrew 2016 - Forum software by © MyBB