The log controller, which is used for displaying logs from Cron, will only display 10 log entries for each cron config entity. I think at the very least this should be updated to display more than 10, and at best should incorporate a pager so that they can all be viewed.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bkosborne created an issue. See original summary.

nortmas’s picture

StatusFileSize
new1.61 KB

Here is the patch.

nortmas’s picture

StatusFileSize
new1.47 KB

Sorry this one should be correct

nortmas’s picture

jayelless’s picture

Note that there is a module ultimate_cron_views that exposes the cron job logs to views to allow for additional reporting.

murz’s picture

Status: Active » Reviewed & tested by the community

Current hard-coded limit of 10 entries to show is very confusing! Especially with available settings for logger cleanup method in Ultimate Cron UI. When users see only 10 records, they think, that limits are not applied!

And provided patch solves this problem, thanks for patch! Will be also good to expose 1000 limit to some settings form, but this is not so necessary.

Can anybody apply this patch to module core?

codebymikey’s picture

Status: Reviewed & tested by the community » Needs work

The current patch probably shouldn't land in the module as it's inefficient to load 1000 entries when only a subset is actually shown on the page.

Drupal has a built-in EntityListBuilder which should help with loading content like this in an efficient manner. So the logger controller can reimplement similar pagination logic as done within that class (as I don't think the logs are actually entities and just raw entries fetched from a backend).

Given that there could be different logger implementations, we'd probably need to introduce a new interface method for whether the logger actually supports pagination or not. If it doesn't, then we can keep the default behaviour of only showing 10-50 or introduce a configuration for how many to show by default.

codebymikey’s picture

StatusFileSize
new2.64 KB

The DatabaseLogger logger already implements the PagerSelectExtender class, so needs to be excluded.

Ideally each logger should implement an interface which states whether they support pagination or not, but in order to keep the feature patch lightweight and avoid any conflicts, it's been implemented this way.

codebymikey’s picture

Status: Needs work » Needs review

The DatabaseLogger logger already implements the PagerSelectExtender class, so needs to be excluded.

Ideally each logger should implement an interface which states whether they support pagination or not, but in order to keep the feature patch lightweight and avoid any conflicts, it's been implemented this way.

prudloff’s picture

Status: Needs review » Needs work

Added a comment on the MR.

prudloff’s picture

Status: Needs work » Needs review
arousseau’s picture

The MR works great using the database logger.

I'm unsure about the 1000 item count when the logger does not support pagination though.
Is it ok to leave as is, or should it be lowered to something more reasonable ?

solideogloria’s picture

Status: Needs review » Needs work

I think 50 or 100 would be more reasonable. 1000 seems too high. I would probably choose 50, as that's the number of rows displayed in /admin/people or other similar screens.

dieterholvoet made their first commit to this issue’s fork.

dieterholvoet’s picture

Status: Needs work » Needs review

Changed to 50

berdir’s picture

Status: Needs review » Reviewed & tested by the community

50 seems fine. Quite a bit of code duplication and hardcoded checks on the database plugin isn't nice.

Once again, I think that the module is currently too extensible/pluggable which increases complexity but results in limited benefits. Maybe this should just be an interface and a service and we design it so that another implementation would need to handle this itself. But lets focus on a stable release and refactor this later.

dieterholvoet’s picture

Status: Reviewed & tested by the community » Needs work