Task logs

Task logs

Andrew Lyons發表於
Number of replies: 4
Core developers的相片 Moodle HQ的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片 Testers的相片

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


評比平均分數:Useful (5)
In reply to Andrew Lyons

Re: Task logs

Séverin TERRIER發表於
Documentation writers的相片 Particularly helpful Moodlers的相片 Testers的相片 Translators的相片

Hi Andrew,

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...

Séverin

In reply to Séverin TERRIER

Re: Task logs

Tim Hunt發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
We have long had a quick and dirty hack to do this at the Open University. Really good to finally see a proper implementation going into Moodle core.
In reply to Andrew Lyons

Re: Task logs

Rex Lorenzo發表於

This week be incredibly useful.


Another useful bit that you can add is an option to have the next time the task is run to enable debugging. You can specify debugging if you run the task via command line but would be nice to surface that in these logs to aid in debugging task failures

評比平均分數:Useful (1)