Please Improve The Design Of The Logging System

Logs currently are nearly useless.

- You can not perform a meaningful search beyond date ranges on them

- They are not keyed to their underlying related objects so its impossible to run meaningful sql without parsing nearly every record

- They are not exposed via the json API

If you just provide a key to their related object in a column it would be much more useful. Then you could join or do selects on their related object pages. ie. joining orders with their related logs or user events with their related log entries. This would allow an administrator for instance to bring up a user and see all the failed logins on his account, or perhaps give a history of a product when the admin is looking at that product.

Everything is there already to make these changes so it wouldn't be a hard improvement.

I'll be creating an addon to do these things in the meantime but it would be so easy to have this baked in all ready.

Also the hook 'save_log' isn't sufficient. If you add a hook after the log in saved that passes the log_id to the subscriber then it would be easier to do useful things with the log in addons.

something like 'save_log_post'

You should post your hook request here: http://forum.cs-cart.com/topic/40547-your-add-on-needs-a-new-hook-in-cs-cart-post-it-here/

Thanks for the pointer!

This is still an issue.

What's to prevent you from extending the logs table to add a column for object_id and to then use the hook to set that value based on your criteria?