Jump to content

Error logging strategy for modules


Recommended Posts




I've written a module and I would like to log all errors that occur while using my module in a log table.

That includes PHP errors.


Basically anything the goes wrong while my module's code is being executed should get logged.

All code that is not triggered by or part of my module should just be handled by Prestashop.



Any known strategies for this?


Own ideas

I've been thinking about registering my own error handler which activates when a method of my module is getting called.

And when that method finishes, the previous error handler get reinstated.

But if there's a better way, then I'm all ears  :rolleyes:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More