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.
- 0 - TRACE
- 1 - DEBUG
- 2 - INFO
- 3 - WARN
- 4 - ERROR
- 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.
Navigation Control
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.