Skip to main content

e

e

Write a log from a script at the level you choose.

Parameters

NameTypeDescription
loganyThe value to log. Beyond strings, you can pass any type — a number, an object — and it's converted to a string internally.

Returns: void

Description

Writes the log to the Lucy Studio log viewer. The method name determines the level, and you can filter by level in the viewer.

MethodLevelUse
$log.d(log)DebugDetailed information for checking state during development
$log.i(log)InfoRecording the ordinary flow of behavior
$log.w(log)WarningWarning about a potential problem
$log.e(log)ErrorRecording errors and exceptions

Example

$log.d("버튼 클릭됨");

const data = $vm.getDSValue("userList");
$log.i("데이터 건수: " + data.length);

if (data.length === 0) {
$log.w("데이터가 없습니다. 조회를 먼저 실행하세요.");
}

try {
// Handle the logic
} catch (e) {
$log.e("오류 발생: " + e.message);
}

Related

  • $vm.showToastMessage — Displays a toast notification on screen.