Differences Between: [Versions 402 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 |
logmanager:: (11 methods):
start_logging()
should_log()
get_logger_classname()
has_log_report()
uses_standard_settings()
get_url_for_task_class()
is_current_output_buffer()
is_capturing()
finalise_log()
flush()
add_line()
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 |