SB1 application logging

How do I  add logging to my JavaScript code running on the device ?