Languages

Menu
Sites
Language
Wearable - setup log tag, level, etc?

Hello everybody!

 

How can I properly log messages into system log when developing applications for wearable? Now I use

console.log("Hello!");

But seems there should be better API. In particular, I would like to set log tag, level and other options. Can't find something useful in docs.

View Selected Answer

Responses

3 Replies
Mark as answer
Marco Buettner

You can use console.log, console.info, console.error, console.debug. 

The sdb dlog supports tag, level etc. But messages from Web-Apps will manage about the Tag: ConsoleMessage ;) So you can use 

sdb dlog ConsoleMessage:E

Now dlog will only show messages of console.error,TypeError or ReferenceError.

Vladimir Shalimov

Thanks for reply, now it's clear :)

Hope we'll have ability to set any custom tags from Web'Apps in future - it will be very useful to separate various applications and various application modules

Marco Buettner

Indeed ... But in the most scenarios you only debug one app? Soooo ConsoleMessage will only show debug text of the current running application...