2

I am using the CodeIgniter MVC framework. This framework contains the option to log errors. I prefer to not change anything in the core of the framework. So I am kinda having my doubts on using the default logging of the system, as this will also add PHP notices to the log files.

Is it wise to not use the CI logging and create my own logging system (adding the logs to the database, for example)?

Thanks in advance.

1 Answer 1

7

Probably the better option is to extend the CI logging system with your own functionality if you want to do this. The CI logging is pretty good, and it also logs your PHP errors if you want. Besides that, when extending, you can easily add options to it like:

  • Saving the data to the database
  • Sending an e-mail with the log information to yourself

There are good examples to do things like that, e.g.:

You can also adjust an example like that to also save the information to your database, or whatever you want to do with it..

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.