Welcome Guest, Not a member yet? Register   Sign In
"404 Page Not Found --> images" in log file
#1

[eluser]ojcarga[/eluser]
Hi there

I have just realized that my app is getting this error in the error log file /application/log/ ... i haven´t found anything about it that is why i´m asking.

Is there a way i can trace the point where that error is?

Just nosing around it, trying to figure it out.

Cheers!
#2

[eluser]summanerd[/eluser]
Depends on where you want to see the error. The simplest & quickest way I do it is using PHP's stack trace like so (taken from PHP manual):

Code:
try {
test();
} catch(Exception $e) {
var_dump($e->getTrace());
}

If you want to see it in your logs instead of on the screen I use CI's log function and jsonencode the results of the stack trace.

Code:
try {
test();
} catch(Exception $e) {
log_message("error", json_encode($e->getTrace()));
}

The second option can remain in the code, but the first will need to be removed after testing is complete.

Let me know if this makes sense.




Theme © iAndrew 2016 - Forum software by © MyBB