mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16:42 +02:00
MDL-80309 tasks: Clean up mtrace logs
This commit is contained in:
parent
2d2dc7e154
commit
76c940134c
4 changed files with 34 additions and 3 deletions
|
@ -45,5 +45,6 @@ function tool_task_status_checks() : array {
|
|||
* @param string $eol End of line character
|
||||
*/
|
||||
function tool_task_mtrace_wrapper(string $message, string $eol): void {
|
||||
echo s($message . $eol);
|
||||
$message = s($message);
|
||||
echo $message . $eol;
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ require_sesskey();
|
|||
\core\session\manager::write_close();
|
||||
|
||||
// Prepare to handle output via mtrace.
|
||||
require('lib.php');
|
||||
$CFG->mtrace_wrapper = 'tool_task_mtrace_wrapper';
|
||||
|
||||
// Run the specified tasks.
|
||||
|
|
|
@ -89,6 +89,7 @@ echo $OUTPUT->select_element_for_append();
|
|||
|
||||
// Prepare to handle output via mtrace.
|
||||
echo html_writer::start_tag('pre', ['style' => 'color: #fff; background: #333; padding: 1em; min-height: 24lh']);
|
||||
require('lib.php');
|
||||
$CFG->mtrace_wrapper = 'tool_task_mtrace_wrapper';
|
||||
|
||||
// Run the specified task (this will output an error if it doesn't exist).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue