zettajs/zetta

Device log messages not present on device's "logs" stream

Opened this issue · 3 comments

Whenever a device.log() call is made, the output appears in the console and on the servers "logs" topic, but not on the device's "logs" topic.

The message object received from the server's "logs" topic also doesn't have an indication of the source of the log, other than the device's name which could be duplicated or not exist.

    {"topic":"logs","timestamp":1454007921652,"msg":"1454007921652","level":"info","event":"my-device-log"}

Could the message that comes from the server "logs" include the ID of the device? Or possible modify the topic to follow the protocol of the WebSocket event stream?

Additionally, could device log messages be available on the device's "logs" stream?

Thanks @kyork-cl.

I agree, when using .log() from the device i'd expect it to show up on the devices log stream.

Also I think we should modify the current log format in the server's log to at least show the devices id.

@kevinswiber @mdobson Any thoughts on the proposed changes?

Nope. What would the websocket format look like? Something like:

{
"topic":"",
"timestamp":"",
"data": "LOG MESSAGE"
}

--
Matthew Dobson | apigee https://apigee.com/ | m: +1.734.634.5472 |
twitter @mdobs http://twitter.com/mdobs @apigee
https://twitter.com/apigee | Apigee Community
http://community.apigee.com/
for answers, ideas and support!

On Fri, Jan 29, 2016 at 10:39 AM, Adam Magaluk notifications@github.com
wrote:

Thanks @kyork-cl https://github.com/kyork-cl.

I agree, when using .log() from the device i'd expect it to show up on
the devices log stream.

Also I think we should modify the current log format in the server's log
to at least show the devices id.

@kevinswiber https://github.com/kevinswiber @mdobson
https://github.com/mdobson Any thoughts on the proposed changes?


Reply to this email directly or view it on GitHub
#287 (comment).

Also to note the current device log streams do not show up in the the multiplexed websocket when subscribed to **