Link Search Menu Expand Document

Debug Logging

Logging is an important part of App development.

Libertas-OS has it’s system log. Libertas Studio has a system log viewer.

Note: System log is different than notifications. System log is for system administrators and developers. Notification is for end-users.

Log Level

Libertas defines six log levels.

declare enum LibertasLogLevel {
    TRACE,
    DEBUG,
    INFO,
    WARN,
    ERROR,
    FATAL,
}

Below are icons for different levels in Log Viewer.

  • Trace 0 - TRACE
  • Debug 1 - DEBUG
  • Info 2 - INFO
  • Warn 3 - WARN
  • Error 4 - ERROR
  • Fatal 5 - FATAL

Logging API

function Libertas_Log(level: LibertasLogLevel, message: string): void

Note:

“message” is truncated at 1024.

The log activity is subject to rate limit.

Log Viewer

Log Viewer is part of Libertas Studio Web interface.

Pretty straightforward. From left to right:

Begin, Prev Page, Current Index, Total Messages, Next Page, End, Track end.

If “Track end” is checked, the viewer will keep track of the update and display the latest messages in real time.

Log Viewer