Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

event logging system


Go to End


2 Posts   1346 Views

Avatar
eoor

Community Member, 5 Posts

4 September 2008 at 8:32pm

Hi, I want to implement event logging system to SS.Each action in admin panel that change something should be logged. Has anybody any idea how it can be done?

Avatar
Willr

Forum Moderator, 5523 Posts

5 September 2008 at 9:41pm

Well SilverStripe has a versioning system which you can see when people republish pages and what changed - under Page Version History on the left which will show you each revision. If thats not enough and you need to log every event I would say use a 'onBeforeWrite()' method on whatever you want to log. Eg if changes on page you could do an onBeforeWrite() method which saves or emails or logs to a file etc before it saves the object