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.
I think it will be a good improvment
For the moment, i keep track of different Moodle automated tasks, like cron executions, CAS synchronisation, Automated Backups and Course enrolments (via DB) in several different log files per type and date of execution.
I've then created a bash script to verify these files daily (or weekly), and send an email to have an easy way to know what isn't good on my Moodle installation. It also allows my (Admin) collegues, less technical, with no direct access to the server to be warned when something is wrong (even if i'm away).
This improvment seems promising. Hope you can also provide a way to directly inform admins if something is wrong ; perhaps with a dedicated task, or an email...