Repository navigation
Add possibility to listen to logging events - #30
Conversation
|
Thanks @spudwebb for the contribution - its always welcome! Initial review looks great! I'll review in more detail soon, I am aiming to update the library to the latest Server API offerings, so I may retarget this PR to the 4.0.0 Branch once I have fully reviewed, that aims to bring it up to date. I want to update the web socket client code also, I'm not too keen on it currently. until then - Many many thanks 👍 |
|
HI @spudwebb I have had time to look at this. I wonder if we should move this outside of the You see, Im trying to remain faithful in the exposed methods that are offered by the Native JS Module and its namespaces.
But then in saying that, I have properties and events, that are not native in the Driver, so I'm questioning my own choices here 😅 @raman325 |
|
@marcus-j-davies, I think I understand what you mean, but in the Z-Wave JS Server project itself this command is included in the Anyway I don' t have a strong preference, so whatever you think is best will be fine with me. |
|
No problem. I'll wait to see what @raman325 responds with. Keeping the |
|
that's a good point, yes this is a utility method that the server adds which creates a custom transport to forward the logs over the websocket. Something to consider updating in the server too, we have server level commands so there's an existing pattern to follow |
|
Cool, @spudwebb, |
I created methods to start and stop listening for logging events as per https://github.com/zwave-js/zwave-js-server#start-listening-to-logging-events
I did not implement the optional filter parameter as I'm not sure of how it works, and I couldn't find any documentation about it.