Welcome Guest, Not a member yet? Register   Sign In
Logs class hack
#1

[eluser]Adam K[/eluser]
Hello, today I found out, that in class Logs.php (and in CI as general), info logging has lower priority than debug. Therefore, when I want to log something (as Info), I have to set log_threshold to 3, having logged also 20 debug messages per view.

What I did was to switch log levels in system/libraries/Logs.php (following is excerpt):

Code:
class CI_Log {

    var $log_path;
    var $_threshold    = 1;
    var $_date_fmt    = 'Y-m-d H:i:s';
    var $_enabled    = TRUE;
    var $_levels    = array('ERROR' => '1', 'INFO' => '2',  'DEBUG' => '3', 'ALL' => '4');

Am I the only one, who thinks that info messages should have higher priority than debug messages (After all, CI generates no info messages)? Or am I missing some dead-simple logging system in CI?


Messages In This Thread
Logs class hack - by El Forum - 04-09-2010, 08:02 AM
Logs class hack - by El Forum - 04-09-2010, 09:23 AM
Logs class hack - by El Forum - 04-09-2010, 05:06 PM
Logs class hack - by El Forum - 04-10-2010, 05:22 AM
Logs class hack - by El Forum - 04-10-2010, 07:02 AM
Logs class hack - by El Forum - 04-10-2010, 07:04 AM
Logs class hack - by El Forum - 06-21-2010, 07:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB