Welcome Guest, Not a member yet? Register   Sign In
CI logging too many errors
#1

[eluser]fchristant[/eluser]
In my CI config file I have this logging treshold set:

$config['log_threshold'] = 1;

In index.php, I have set the following error reporting:

error_reporting(E_ERROR);

My expectation is that this will log any CI errors that I log (using log_message('error','my error message')), as well as any PHP errors. However, I would expect that it will not log PHP notices, only errors. However, when I look at the log files, it seems to log PHP notices too:

ERROR - 2009-12-18 13:21:50 --> Severity: Notice --> Undefined variable: pageindex /var/www/apps/OS4W/system/application/views/user/view.php 12
ERROR - 2009-12-18 13:21:50 --> Severity: Notice --> Undefined variable: friendsmode /var/www/apps/OS4W/system/application/views/user/activitytable.php 207


Although the log lines start with "ERROR", in reality this seems to be a PHP notice, kind of like a warning, that I do not want to log. How can I make sure only CI and PHP errors are logged, yet not PHP notices? I thought error_reporting(E_ERROR) would do just that?
#2

[eluser]Whiplash[/eluser]
I think I figured out how to get around this. Here's my possible solution on StackOverflow

http://stackoverflow.com/questions/19289...g-too-much
#3

[eluser]fchristant[/eluser]
I have found a solution that allows for gine grained control over PHP error logging:

http://stackoverflow.com/questions/19289...53#1939053

It does patch the core, but I have not found any other reliable way to get this control. I hope this helps anyone, thanks for thinking along.




Theme © iAndrew 2016 - Forum software by © MyBB