GHOP #139: add a workflow-ng logging module

fago - January 12, 2008 - 15:45
Project:Workflow-ng
Version:5.x-2.x-dev
Component:Module Integration
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Issue tags:GHOP
Description

Currently one can use workflow-ng to log to drupal's logging system. As this fits for logging system messages for administrators, it doesn't fit for logging information for certain entites like content or users.
So this task is about a new small module "workflow_ng_log" - a content and user oriented logging system. Logging messages can be created with the help of a workflow-ng action. Views integration allows building customized interfaces for message listings.
This makes a lot of things possible, e.g. logging content updates or even user's activity. Each event supported by workflow-ng could be logged.

The module should provide a token enabled action for logging messages for a given entity. The action configuration should allow one to set
* a message type (textfield)
* a category (textfield)
* the actual logging message (textarea)
Furthermore the content action takes an argument, which may be either content or a user. You can do this by allowing both "nodes" and "users" for the same argument ('#entity' => array('user', 'node')).
The module has to create two database tables for storing the user/content log messages. It should also store the actual time. The necessary database fields are (nid/uid, type, category, message, time).

#1

fago - January 12, 2008 - 15:53
Title:GHOP #X: add a workflow-ng logging module» GHOP #139: add a workflow-ng logging module

http://code.google.com/p/google-highly-open-participation-drupal/issues/...

#2

corsix - January 18, 2008 - 07:51
Status:active» needs review

Initial draft attached.

AttachmentSize
workflow_ng_log.tar_.gz 1.32 KB

#3

fago - January 18, 2008 - 14:32
Status:needs review» needs work

looks already good. here are some comments:

* make use of the function workflow_ng_token_replace_all(), which is part of workflow-ng's new token API. One could also use extract() on the result of it.
* module naming: "Logging Actions" doesn't fit very well.

First off, the module is more than just actions. As there will be also views integration added to it. Then there is already a logging action in workflow-ng itself, which just logs to the watchdog. The distinction is, that this logs for entities. So perhaps "Entity Logging" would be more appropriate, but doesn't sound well. So perhaps we should just use "Workflow-ng Log"? Perhaps you can think of a good name for it?

You can add the module to workflow-ng's directory as another module, like states or cclinks. Then you can create a patch. :)

#4

corsix - January 18, 2008 - 16:10
Status:needs work» needs review

* Switched to workflow_ng_token_replace_all / extract
* Make some checks for log type/category extending 255 characters
* Gone with title "Per-Entity Logs" and extended the description to state that it provides per-user and per-node logs that are (or will be) presented using views.

AttachmentSize
workflow_ng_log.patch 5.51 KB

#5

fago - January 18, 2008 - 19:07
Status:needs review» fixed

great! committed to 5.x-2.x! That was quick!

#6

Anonymous (not verified) - February 1, 2008 - 19:11
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.