You are here

public function BackgroundProcess::log in Background Process 7.2

Log a message for the process.

Parameters

$message: Message to log

$severity: Watchdog severity level (WATCHDOG_ERROR, etc.)

3 calls to BackgroundProcess::log()
BackgroundProcess::doKeepAlive in ./background_process.inc
Re-launch the process if necessary
BackgroundProcess::getLog in ./background_process.inc
Get accumulated log for the process.
BackgroundProcess::shutdown in ./background_process.inc
Shutdown

File

./background_process.inc, line 852
External API short overview

Class

BackgroundProcess
@file

Code

public function log($message, $severity = -1) {
  $this->log['entries'][] = array(
    'message' => $message,
    'severity' => $severity,
  );
  $this->log['severity'] = $this->log['severity'] < 0 || $severity >= 0 && $severity < $this->log['severity'] ? $severity : $this->log['severity'];
  return $this;
}