One of my wishes for this project is to let the user prune by "type" as well as by age.
Some examples of use cases:
Delete all the 'system' watchdog entries after XX days.
Delete all the 'cron' watchdog entries after XX days.
And so on.
I imagined this as being another option on the admin/config form for this module, like this:
Enter the types to prune, separated by comma (TEXTAREA)
Delete after how many days? (SELECT LIST)
This would run in hook_cron after the age pruning takes place.
Anyway, just my thoughts on it. Doesn't have to be set up that way if anyone can think of a more elegant way to do it.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | watchdog-prune-type-2857887-7.patch | 8.24 KB | vishwac9 |
| #3 | watchdog-prune-type-2857887-3.patch | 3.08 KB | vishwac9 |
Comments
Comment #2
vishwac9 commented@richardp this is a good feature i have started working on it.
Comment #3
vishwac9 commentedhi @richardp i am attaching a patch for the above mentioned functionality. Please go through it and let me know if this is ok of what should be included in the next version.
I have made it somewhat like :-
On configuration page.
Textarea to include:
watchdog_type|duration|severity(optional)
watchdog_type1|duration1|severity1(optional)
watchdog_type2|duration2
Validate function will follow soon with this to check all the user entered settings.
Comment #4
richardp commentedYes, this patch looks good to me. I haven't applied it, just eye-balled it. I do want to make sure we keep the original functionality of pruning by age, regardless of type, and this new functionality is *in addition* to that?
It looks like that is what's going on, but again, I'm just eye-balling the patch file. Can you confirm?
Comment #5
vishwac9 commentedYes, i have not removed any of the earlier settings. What i was thinking that if the users leaves the new Textarea settings blank, we will purge the watchdog table by by age. But this will need some extra logic to be written for the new functionality.
Comment #6
richardp commentedOkay, sounds good to me. Thanks for your work on this.
Comment #7
vishwac9 commentedhi richardp,
I am done with almost all the required changes.
Summary of things done.
Remaining tasks .
Update README.txt file and module description on drupal.org/project/watchdog_prune page.
Apply the patch, check the changes, update if you feel. And push :)
Comment #8
richardp commentedEverything looks great to me, please feel free to push changes whenever you are ready. Also, I'd go ahead and release a new version, as either alpha2 or beta1.
Thanks for everything!
Richard
Comment #10
vishwac9 commentedPushed all the changes and yes please roll out a new version. Will start working on D8 version in a day or two thanks :)
Comment #11
richardp commentedTo do a new version, you need to create a "tag" in the git repository for your latest commit. If you need to re-push (I think you do), just add a space or something to the readme.txt file.
Anyway, name the tag "7.x-1.0-beta1" or what have you.
After you push that, you should see a link for "add new release" towards the bottom of the project page. You should then be able to select your tag from the list, to publish that version. The publishing process can take about 10 minutes after you save it.
Please give this a try, and see if the system lets you do all this. You should have the same permissions I do.
Comment #12
vishwac9 commentedthanks for the information will try in few hours, its late night need to take some rest :)
Comment #13
vishwac9 commentedHi,
I have just released a new version of the Module, by following all the steps as suggested, thanks. The new version is 7.x-1.0-beta1
Comment #14
vishwac9 commentedhi @richardp please " Opt In " Watchdog Prune module for Security advisory policy. Looks like as a owner only you can do it.
Comment #15
richardp commentedI will do that now, but according to the comments on this page (about getting the green shield), it looks like the version has to be a non-beta major release (ex: 7.x-1.1). Also, it looks like the response time is pretty slow. I will go ahead though.
Page: https://www.drupal.org/security-advisory-policy
Richard
Comment #16
vishwac9 commentedso should we change the modules tag to a stable release somewhat like 7.x-1.2 and 8.x-1.2
Comment #17
richardp commentedAs I understand it, yes, that's right-- in order for it to *possibly* be reviewed by the security team to get the badge. But, let's wait a little while until more of the community has time to test or offer input before we move from beta to a full release.