Detecting Application Errors, Syslog

From WebOS Internals
Jump to: navigation, search

The Palm Pre has an active Linux syslog process running to capture errors, warnings and informational messages from the running applications on the phone.

To view the output of the system logger process, view the contents of the /var/log/messages file.

To continually view the output of the system log in your terminal use the following command:

tail -f /var/log/messages

Errors in your JavaScript applications will be reported to the system log from the LunaSysMgr application. A sample error message appears as:

2009-06-11T03:27:32.302056Z [105] castle user.err LunaSysMgr: {LunaSysMgrJS} Uncaught SyntaxError: Unexpected token ,, file:///usr/palm/applications/

Looking at the log, the first component is the date/time stamp, followed by the process id of the reporting process. The application name and finally the log message are shown.

Use the related dmesg command to view kernel level errors/messages from the kernel buffer. Most application development (all development at the JS/JSON level) will be logged to the message file, not dmesg.