I am considering a purchase of Craft Pro in place of a new ExpressionEngine build for a client. One of the client's requirements is that there be a comprehensive set of logs like Audit Pro of what each user is doing (logging on, deleting entries, changing settings) and when. Is that data logged in Craft Pro, or is there a plugin that would accomplish that functionality?
3 Answers
I don't know of a plugin that exists expressly for this purpose, but you could combine LumberJack (logging plugin) with Craft's numerous events to make this happen with your own plugin. You can log from within said plugin or even in your Craft templates.
Take a look at the event reference and see if there's enough there to satisfy your client's needs. Creating your plugin should be pretty straightforward.
It may also be worth noting that Craft's logs are available from the control panel at /admin/utils/logs
. These are developer-centric errors and warnings though, not a record of specific user actions.
-
Thanks for the prompt reply! It looks like the only thing that might be missing is events for when settings are changed, and logouts. Is the documentation generally up to date? Commented Jun 19, 2014 at 16:21
-
1Yes, the documentation stays up to date as far as I can tell. I had a peek at
SystemSettingsService
andSystemSettingsController
and I don't see any undocumented events. You might submit a feature request on Google+ for hooks around settings changes, unless I'm mistaken and they're already in there somewhere! Commented Jun 19, 2014 at 16:27
We've discussed the ability to have an "audit trail" of actions for a given user in Craft, so you can see exactly who did what, where and when, but given that it's a relatively minor use-case and would have a potential performance impact, it would either be a config setting turned off by default or a first or third-party plugin.
https://plugins.craftcms.com/activity-logs
This plugin records the more low-level HTTP request data (i.e not Craft specific events). It does however save action name - when applicable - and allows for labeling it and filtering by it.
The user has full control over which requests are recorded both through the Settings page (for more general filtering, e.g Control Panel, Site, Actions Only etc.) or a more advanced programmatic request filter that you can tailor to your needs.
Full disclosure: I'm the author.