Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Static Public Member Functions | Public Attributes | List of all members
core\task\database_logger Class Reference

Database logger for task logging. More...

Inheritance diagram for core\task\database_logger:
core\task\task_logger

Static Public Member Functions

static cleanup ()
 Cleanup old task logs.
 
static delete_task_logs (array $logids)
 Delete task logs for the specified logs. More...
 
static get_url_for_task_class (string $classname)
 Get any URL available for viewing relevant task log reports. More...
 
static has_log_report ()
 Whether this task logger has a report available. More...
 
static is_configured ()
 Whether the task is configured and ready to log. More...
 
static store_log_for_task (task_base $task, string $logpath, bool $failed, int $dbreads, int $dbwrites, float $timestart, float $timeend)
 Store the log for the specified task. More...
 

Public Attributes

int const TYPE_ADHOC = 1
 Type constant for an adhoc task.
 
int const TYPE_SCHEDULED = 0
 Type constant for a scheduled task.
 

Detailed Description

Database logger for task logging.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ delete_task_logs()

static core\task\database_logger::delete_task_logs ( array  $logids)
static

Delete task logs for the specified logs.

Parameters
array$logids

◆ get_url_for_task_class()

static core\task\database_logger::get_url_for_task_class ( string  $classname)
static

Get any URL available for viewing relevant task log reports.

Parameters
string$classnameThe task class to fetch for
Return values
moodle_url

Implements core\task\task_logger.

◆ has_log_report()

static core\task\database_logger::has_log_report ( )
static

Whether this task logger has a report available.

Return values
bool

Implements core\task\task_logger.

◆ is_configured()

static core\task\database_logger::is_configured ( )
static

Whether the task is configured and ready to log.

Return values
bool

Implements core\task\task_logger.

◆ store_log_for_task()

static core\task\database_logger::store_log_for_task ( task_base  $task,
string  $logpath,
bool  $failed,
int  $dbreads,
int  $dbwrites,
float  $timestart,
float  $timeend 
)
static

Store the log for the specified task.

Parameters
task_base$taskThe task that the log belongs to.
string$logpathThe path to the log on disk
bool$failedWhether the task failed
int$dbreadsThe number of DB reads
int$dbwritesThe number of DB writes
float$timestartThe start time of the task
float$timeendThe end time of the task

Implements core\task\task_logger.


The documentation for this class was generated from the following file: