Welcome Guest, Not a member yet? Register   Sign In
Error Reporting Levels
#1

[eluser]pyrokinesis[/eluser]
Hi guys,

Is it possible to set the log_threshold level in the config file to show all errors:

$config['log_threshold'] = 4;

and then in a controller, change the log_threshold to 0.

Basically I have 50% of a site done and am working straight on a live site.
I want to show all error messages in the controllers I am working on and hide the errors in the finished controllers....

Any ideas,

Thanks :-)
#2

[eluser]garymardell[/eluser]
I don't know if it is possible, but err surely there should not be any errors in the finished controllers.
#3

[eluser]devbro[/eluser]
if you have access to the shell then you can use grep to extract specific errors. here is what I am doing right now.


grep form_validation *| grep DEBUG | less

it extracts all lines from logs where it contains my class name 'form_validation' (I had it added in log_message() ) and only DEBUG level errors are taken out.
#4

[eluser]pyrokinesis[/eluser]
Thanks for the replies guys,

It's not the actual logging of errors to a file that I am trying to change, it's the display of them.
I think the setting is in the main 'index.php' file in the root, and thats what I'm trying to change dynamically, albeit difficultly.

I thought there might be a scenario to change the error reporting level for a specific controller, or more appropriately a specific method in that controller.

If I change it to show_all site wide, users might get scared Smile or haXors might get some usefull info.

Ideal solution would be to turn off error_reporting and enable full error_reporting for the methods of a controller that still have to be debugged and put live.

Thanks for the help :-)




Theme © iAndrew 2016 - Forum software by © MyBB