e
e
Write a log from a script at the level you choose.
Parameters
| Name | Type | Description |
|---|---|---|
log | any | The 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.
| Method | Level | Use |
|---|---|---|
$log.d(log) | Debug | Detailed information for checking state during development |
$log.i(log) | Info | Recording the ordinary flow of behavior |
$log.w(log) | Warning | Warning about a potential problem |
$log.e(log) | Error | Recording 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.