webOS Browser "console.log()"?

I'm testing an enyo-2.0 website on my Touchpad, but console.log() doesn't send anything to novaterm's log (/var/log/messages). "alert()" works in the form of a popup on the screen.

Is there another potential command to use?


  • edited March 2012
    You can use enyo.log() instead. Using enyo.log() does the same thing as console.log() in Chrome, and it outputs to the log on the Touchpad.

    EDIT: At least that's how it works on Enyo 1.0. Not sure about 2.0.
  • In enyo 1.0, enyo.log ultimately maps to console.log. I'm not sure why it wouldn't work correctly, but you can get the raw logs by doing
    stop LunaSysMgr; LunaSysMgr
    and letting the system output the raw webkit console output to your terminal. This will restart the app interface on the device.
  • By website, do you mean using the browser app? I'm guessing console.log output in the browser doesn't go to the system log otherwise a website could easily flood the system log. I don't know if there's a way to view the browser JS logs though.
  • Ah, didn't noticed the website mention.

    Yeah, website console output doesn't go into the log. However, to see it, use the command
    stop BrowserServer; BrowserServer
    to restart the browser version of WebKit in your current terminal window. You'll then see any console log on the standard output.
Sign In or Register to comment.