Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 403]

Task log manager.

Copyright: 2018 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 352 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: logmanager  - X-Ref

Task log manager.

start_logging(task_base $task)   X-Ref
Create a new task logger for the specified task, and prepare for logging.

param: \core\task\task_base    $task The task being run

should_log()   X-Ref
Whether logging is possible and should be happening.

return: bool

get_logger_classname()   X-Ref
Return the name of the logging class to use.

return: string

has_log_report()   X-Ref
Whether this task logger has a report available.

return: bool

uses_standard_settings()   X-Ref
Whether to use the standard settings form.


get_url_for_task_class(string $classname)   X-Ref
Get any URL available for viewing relevant task log reports.

param: string      $classname The task class to fetch for
return: \moodle_url

is_current_output_buffer()   X-Ref
Whether we are the current log collector.

return: bool

is_capturing()   X-Ref
Whether we are capturing at all.

return: bool

finalise_log(bool $failed = false)   X-Ref
Finish writing for the current task.

param: bool    $failed

flush()   X-Ref
Flush the current output buffer.

This function will ensure that we are the current output buffer handler.

add_line(string $log)   X-Ref
Add a log record to the task log.

param: string  $log
return: string