Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We use the light weight cron, which needs to runs every 5 minutes. The watchdog is full with this messages:
Internal scheduler cron run activated
Internal scheduler cron run completed
Would be nice to have a setting to opt out these notices and only print the messages from scheduler_cron().
I could code this if the maintainer is interested in this feature.
Comment | File | Size | Author |
---|---|---|---|
#13 | 1706232-remove-watchdog-10.patch | 2.81 KB | acbramley |
#10 | 1706232-remove-watchdog-9.patch | 2.4 KB | acbramley |
#8 | 1706232-remove-watchdog-8.patch | 2.41 KB | wiifm |
#7 | 1706232-remove-watchdog-7.patch | 2.41 KB | wiifm |
#4 | lightweight-cron-settings.png | 21.33 KB | liquid06 |
Comments
Comment #1
acbramley CreditAttribution: acbramley commentedI needed this feature too so went ahead and implemented it.
Comment #2
acbramley CreditAttribution: acbramley commentedComment #3
jonathan1055 CreditAttribution: jonathan1055 commentedHi, I like this idea, and the patch looks ok.
Is the log normally referred to as 'watchdog' or is it known as the 'dblog'? Not sure what terminology is best.
Also I tried to come up with a description in positive terms, which is normally the preferred way, instead of saying 'Uncheck this ...'. The best I could do was 'It is useful to have this option on while setting up and testing the internal cron. Turn it off when all is working, to save unnecessary rows in the dblog'
You could add that any actions taken by Scheduler will still be logged, it is just the 'activated' and 'completed' internal cron messages which are removed. What do you think?
Jonathan
Comment #4
liquid06 CreditAttribution: liquid06 commentedI think it's called 'dblog' or 'Database logging' in other places in Drupal's UI. The patch in #1 worked for me, but it felt awkward to configure it on Scheduler's page rather than the page that talks about lightweight cron.
My patch
I was a little confused about what to call the cron run iteself - I went with "scheduler's cron" in the description because as far as I know, it's only doing scheduler-related tasks. "Lightweight cron" sounds like something more general that other modules might use too, but I used it in the fieldset title because it matches the name of the configuration page we're on. I guess it could always say "scheduler's lightweight cron" but that's a bit wordy. (It's probably a bit wordy anyway...)
Comment #5
Alan D. CreditAttribution: Alan D. commentedI think that this should be on the main configuration page as it effects general cron runs too.I should have looked at the code, I assumed that it effected every cron run :?There is a variable delete on "scheduler_cron_settings" in scheduler_uninstall(), did you mean "scheduler_watchdog_log"?
Comment #6
jonathan1055 CreditAttribution: jonathan1055 commentedThis is a useful addition - thanks for starting it. Yes the variable names need amending. Also maybe instead of having the separate variable $log it can be condensed by testing directly.
The patch does not currently apply to the latest dev due to #1358656: Incorrect link to settings in cron dblog and will also need re-rolling if/when #1977890: Tidy up titles and descriptions is committed. That second one may also assist in reducing the wordiness.
Jonathan
Comment #7
wiifmRe-roll attached for latest --dev, also changed the variable to match the admin settings.
Comment #8
wiifmWhoops, remove the extra semi colon at the end there.
Comment #9
jonathan1055 CreditAttribution: jonathan1055 commentedThanks for the re-worked patch in #8. However, now that #1977890: Tidy up titles and descriptions has been committed you need to re-roll it against latest dev, currently 1.1+10 dated 28th July.
Here is a suggestion for the option title and text, which adds the bit about normal actions being logged at all times. There is lots to say but I have tried to reduce the wording a bit:
Cheers,
Jonathan
Comment #10
acbramley CreditAttribution: acbramley commentedRerolled against latest dev with text changes as per comment above.
Comment #11
acbramley CreditAttribution: acbramley commentedComment #12
jonathan1055 CreditAttribution: jonathan1055 commentedExcellent, thanks for re-rolling the patch. Tested and looks good.
Just one minor thing (which I'm sorry I did not spot before) - please can you change the stored variable name from 'scheduler_watchdog_log' to 'scheduler_lightweight_log'. This variable is specifically for the lightweight messages, and we do not need both 'watchdog' and 'log' in the name. It is better to be specific about the name, to help future developers.
Thanks again.
Jonathan
Comment #13
acbramley CreditAttribution: acbramley commentedRerolled with new settings, I've used proper git format-patch for this one
Comment #14
jonathan1055 CreditAttribution: jonathan1055 commentedThank you for changing the variable name.
Tested against dev of 28th July, 7.x-1.1+10, and all ok. RTBC
Jonathan
ps there are quite a few other patches which need review. The big interesting one is #773510: Integration with Rules module
but there are also simpler ones such as #1898784: Make log revision text translatable and
#1804508: Extra spaces in date format causes 'Publish on' not to match the expected format
Just thought I'd mention it, if you feel like doing some testing ;-)
Comment #15
rickmanelius CreditAttribution: rickmanelius commentedThanks everyone!
This was committed http://drupalcode.org/project/scheduler.git/commitdiff/d92b1ad
Comment #16
rickmanelius CreditAttribution: rickmanelius commented