You are here

public function LoggerBase::createEntry in Ultimate Cron 8.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.

int $log_type: (optional) The log_type for the log entry.

Return value

LogEntry The log entry created.

Overrides LoggerInterface::createEntry

File

src/Logger/LoggerBase.php, line 35

Class

LoggerBase
Abstract class for Ultimate Cron loggers

Namespace

Drupal\ultimate_cron\Logger

Code

public function createEntry($name, $lock_id, $init_message = '', $log_type = ULTIMATE_CRON_LOG_TYPE_NORMAL) {
  $log_entry = new LogEntry($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;
}