Skip to content

context.Log

Overview

Output logs from the "Server Script" to the browser's console. The log output on the server side is sent to the client, and the client-side script outputs the log to the browser's console.

Syntax

context.Log(message);

Parameters

Parameter Type Required Overview
message object Yes error message

Return Value

There is no return value.

Usage Examples

In the example below, the log is output when a user with department ID 3 tries to complete a "Status Column". Also, when an error is detected by try catch, error information is output to the log.

JavaScript
try {
    if (context.DeptId === 3 && model.Status === 900) {
        context.Log('Conditions met.');
    }
} catch (e) {
    context.Log(e.stack);
}