log
Saves a log a message in the trace_roll.log file located in the root of the web application.
Syntax
Copy
function log(message: string, {level: 'debug' | 'info' | 'warning' | 'error' | 'fatal'}): void
| Parameter | Type | Description |
|---|---|---|
message
|
string | Message to be logged. |
level optional |
'debug' | 'info' | 'warning' | 'error' | 'fatal' | Optional label for the severity level of the log message. |
Examples
In this example, we log the following message in the trace_roll.log file: Onboarding completed successfully. The message is logged with the info severity level.
Copy
log('Onboarding completed successfully', {level: 'info'});