Rules watchdog action
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
Synopsis
Rules 7.x-2.x does not ship with a rule action to record a log message (i.e.: using watchdog()), but an action like this would be useful, especially for debugging.
This simple module adds a Rules action which records a log message.
Features
As of version 1.x, you can:
- Add a Rules action to record a log message,
- Set a custom log message, which supports token replacement,
- Configure the severity of the log message, and,
- Associate an optional Drupal path, path alias, or external URL with the message.
Requirements
- Drupal 7 core, and,
- Rules 7.x-2.0 or higher.
Recommended modules
We strongly recommend that you install the Database logging module (in Drupal core), the Syslog module (also in Drupal core), or a similar logging backend, so that the log messages generated by this module are stored. Some other logging backend modules are:
- the JSONlog module (note that you will need a web service endpoint to accept and store the log messages, e.g.: Logstash),
- the Email Log module (note that you will need an e-mail address to send the messages to).
We recommend that you install a UI to view log messages. Note that the Database logging module (in Drupal core) provides a UI at admin/reports/dblog, but the Syslog module (in Drupal core) and/or other logging backends may require third-party software to display log messages. For example,
- messages sent by the JSONlog module to Logstash could be viewed using Kibana;
- messages sent by the Email Log module to an e-mail address could be viewed using any e-mail client.
Known problems
We don't know of any problems at this time, so if you find one, please let us know by adding an issue!
Roadmap
We don't have any specific plans beyond the current functionality, but we are open to patches so long as they don't over-complicate the module.
