CodeIgniter Forums
Extending show_error() - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Extending show_error() (/showthread.php?tid=40154)



Extending show_error() - El Forum - 03-31-2011

[eluser]stef25[/eluser]
I'm using show_error() to print out all kinds of errors to the user of my app. I'd like to log all these errors in a DB table and create an RSS feed for easy error monitoring.

Is there any way this function can be extended to include some database interaction? Apart from the error shown to the user I'll also log a timestamp, IP, user agent data.

If DB interaction is not possible, can the show_error function write to log files? In that case I could always parse those files and create an RSS file based on that.

IMHO this could be very useful for others, usable in many projects.