Please enable JavaScript to view this site.

The manual for the JobRouter developer

Navigation: System activities > Description of the PHP API for system activities > API methods > Logging

debug(string $message): void

Scroll Prev Top Next More

Adds a line to the log file depending on the DEBUG log level and can be used to debug a system activity.

Parameter

Type

Description

$message

string

Text of the log entry, which is written to the log file (/output/<activityId>.log) in the DEBUG log level

Example:

try {

    $invoiceNo = 'DE-2020-186533584-001';

    // source code that throws a JobRouterException 

} catch (JobRouterException $e) {

    $this->debug($invoiceNo);

    $this->error($e->getMessage());

    throw new JobRouterException('An error has occurred. For further details, please refer to the log file.');

}