-
Notifications
You must be signed in to change notification settings - Fork 4
Clear log messages button
The event log module should have the ability to wipe all existing event logs. Possibly behind a permission so that only privileged users are able to clear them. Typically all logs are verified which is why the module should have the ability to just get rid of the ones that are verified to remove clutter.
This is also great during releases to start from a fresh log.
Upstream issue link : https://www.drupal.org/node/2275743
This feature enables the administrator and privileged users to clear event logs just on the click of button. This button is located in the configuration option in the modules section corresponding to the Delete Log module.
A new sub-module named event_log_delete is added in the event_log folder. The .module file implements the desired action using a couple of hook api functions namely, hook_menu and hook_permission.
Details about this functions can be found at :
-
hook_menu : To register paths to configuration page and associate a callback form function with it. https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu/7.x
-
hook_permission : To enable administrator to provide privileges to different users. https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_permission/7.x
-
Added Sub-Module does not appear in the same section as the event log
-
No configuration option corresponding to the added sub-module
- Add a package name and dependencies to your .info file so that your sub-module appears under the right section, which is statistics in the event_log module case.
E.g : package = Statistics
dependencies[] = event_log
- Add configure = admin/config/event_log_delete
- Ability to log to a file instead of a database
- Backup event_log database content
- Clear log messages button
- Notify Illegal access to authorized user
- Log Data to Cloud (Experimental)