How to do error logging in CodeIgniter (PHP) |
I want error logging in PHP CodeIgniter. How do I enable error logging?
I have some questions:
Please read:
CodeIgniter 4 User Guide - Error Handling What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
CodeIgniter has some error logging functions built in.
Make your /application/logs folder writable In /application/config/config.php set $config['log_threshold'] = 1; or use a higher number, depending on how much detail you want in your logs Use log_message('error', 'Some variable did not contain a value.'); To send an email you need to extend the core CI_Exceptions class method log_exceptions(). You can do this yourself or use this. More info on extending the core here |
Welcome Guest, Not a member yet? Register Sign In |