Hi folks,
One of the areas I've seen people mention particular pains over (many) years I've worked with Moodle is that of capturing and reviewing the logs from Cron/Tasks. At the moment the recommended way of doing this is by capturing all cron output at time of run (typically by piping output to a log file) but I feel that this has many pitfalls.
To that ends I've bee working on MDL-49399 to capture as much of the output from Moodle tasks as possible, and store it for later viewing within the UI. These changes capture almost all output shown in the console with a couple of exceptions to this (When the PHP interpreter segfaults, and one particular method out of output rarely used). It captures when the task fails, dies, or errors too.
This change also adds a UI to view and search the logs, and links are included from the scheduled task page.
I'd appreciate any feedback, thoughts, comments, etc. that you may have. If this is a feature that you feel would be useful you can also vote on the issue.
I've placed some screenshots at https://imgur.com/a/drge11y and in the issue for reference.
Thanks,
Andrew