Track changes to content, updates to members, events, actions, notes, or anything else that you want to maintain a history for.
A rules custom log can be created through the Rules ACP. Click the "Custom Logs" link. When you create a custom log, you will choose the type of system entity that the log will be associated with (member, content, node). You will then add entries to the log via rules action.
Any custom log that you create will have a minimum of two built in fields:
- Time/date of the log entry
- Message associated with the log entry
Custom Log Fields
In addition to the basic time/date + message fields built into every log, you can add your own additional data fields to your logs which can be used to save additional data or references along with your log entry. Adding a "loggable argument" to your custom log is very similar to creating a custom argument for a custom action. You will choose the type of data which will be stored in the log data, and it will become a configuration point when adding a new log entry via rules.
Custom Log Display
Rules has some basic built in support for displaying custom logs to users. For example, logs associated with content items will be displayed on the content item page on the front end, while logs associated with content containers will be displayed on the container configuration form in the ACP. Custom logs associated with members will be displayed both in the member editing from in the ACP, and as a profile tab on the member profile form on the front end (for those with permission).
There are a few configuration options that relate to how the logs will be displayed:
Default Sort Column / Direction
Changes which log columns will be used to sort the entries on default display
Display When Empty
When disabled, logs without entries will be omitted from display completely until they contain at least one log entry.
Logs Per Page
Changes the amount of entries that will display on each page of the log
Show Log Time
This setting allows you to remove the time/date field from the log entries table when it is displayed. This option may be useful if you have created your own date/time field for the log, or if the date/time isn't relevant to your custom log application.
Log Time/Message Titles
You can customize the language used to describe the log time and log message columns in the display.
Other Custom Log Settings
Maximum Log Size
When you set a maximum log size, then the log will be limited to the set amount of entries total. When this limit is reached, new log entries will cause the oldest entries that go over the limit to be discarded.
Maximum Logs Per Entity
This setting applies to individual entities that logs are associated with. So if you create a custom log which is associated with topics, and you set the "max logs per entity" value to 5, then each topic will have a maximum of 5 log entries. New log entries over the limit will cause the oldest log entries for the entity to be discarded.
Maximum Log Age
This setting applies to the age of the log entries. Entries that are older than the specified setting will be automatically discarded when the log is pruned during the maintenance cycle.
Viewing & Managing Log Entries
All of the log entries for custom logs that you have created can be viewed from the Rules ACP under the "Rules Logs" link. You can browse entries, delete entries, and also prune or empty out logs completely.