Welcome Guest, Not a member yet? Register   Sign In
show_error() and logging
#1

[eluser]steelaz[/eluser]
I was always under impression that show_error() displays AND logs the error, Today I found out that's not the case. Is there a config key/value to log error when show_error() is used?
#2

[eluser]crnalajna[/eluser]
Look in your /application/config/config.php file.
Code:
$config['log_threshold'] = 0;
#3

[eluser]steelaz[/eluser]
I always keep "log_threshold" at 1. Which level is required for show_error() to be logged?
#4

[eluser]gtech[/eluser]
[strike]I dont know for a fact whether this will help but worth a go:

if you look in the config.php file there is a log_threshold key usually set to 2 by default. Is yours set high enough?[/strike]

Ignore sorry
#5

[eluser]gtech[/eluser]
If you read the show_errors() code, it looks like it does not log anything.. its purpose it to show an error to the screen using a template defined in the system\application\errors directory.

see the Exceptions.php file to find the function, you could always extend the library to log the message.
#6

[eluser]steelaz[/eluser]
Yep, that's what I did.




Theme © iAndrew 2016 - Forum software by © MyBB