OpenZWave / Zwave2Mqtt

Fully configurable Zwave to MQTT gateway and Control Panel using NodeJS and Vue
MIT License
352 stars 93 forks source link

[question] Append-mode for zwave logging #881

Closed cramforce closed 3 years ago

cramforce commented 3 years ago

Hey,

My understanding is that OpenZWave supports 2 modes for opening the logging file:

  1. (Default) Open and write to pointer at end of file
  2. Append to file.

I'm wondering which one is used by Zwave2Mqtt today. I'm happy to send a PR to document this, and if it isn't (2) I'd look into adding an option to enable that.

I'm looking into (2) primarily to enable more traditional copy/truncate log rotation.

Thanks for this amazing project!

robertsLando commented 3 years ago

@cramforce Could you use: https://github.com/zwave-js/zwavejs2mqtt ?

cramforce commented 3 years ago

Possibly-ish :)

I had not seen that at all. Looks great. I would probably migrate to this if I have a very free weekend.

cramforce commented 3 years ago

Any chance you have an answer to the original question for the short-term?

robertsLando commented 3 years ago

Actually the logs are appended AFAIK. If it is handeld by an option on driver you can set that option in settings.json

cramforce commented 3 years ago

OK, tested it. Yeah, logrotate with copytruncate works just fine. Thanks!