public function UltimateCronLogger::create in Ultimate Cron 7.2
Create a new log entry.
Parameters
string $name: Name of the log entry (name of the job).
string $lock_id: The lock id.
string $init_message: (optional) The initial message for the log entry.
Return value
UltimateCronLogEntry The log entry created.
File
- ./
ultimate_cron.plugin.inc, line 1195 - Plugin framework for Ultimate Cron.
Class
- UltimateCronLogger
- Abstract class for Ultimate Cron loggers.
Code
public function create($name, $lock_id, $init_message = '', $log_type = ULTIMATE_CRON_LOG_TYPE_NORMAL) {
$log_entry = new $this->log_entry_class($name, $this, $log_type);
$log_entry->lid = $lock_id;
$log_entry->start_time = microtime(TRUE);
$log_entry->init_message = $init_message;
$log_entry
->save();
return $log_entry;
}