NorthernMan54 / homebridge-dht

Homebridge plugin for DHT22 Temperature / Humidity Sensors
73 stars 14 forks source link

Reduce verbosity in log #15

Closed xtvdata closed 6 years ago

xtvdata commented 6 years ago

Hi, thanks for the great plugin.

Would be useful to introduce a parameter to reduce verbosity of logging in syslog.

E.g. conditionally execute: this.log("DHT Status: %s, Temperature: %s, Humidity: %s", result[0], temperature, humidity); at line 97 and this.log("Got Temperature of %s", binaryState); at line 136. (ref. code at tag v0.1.20)

NorthernMan54 commented 6 years ago

That's a great idea, how about creating a pull request with the changes you are thinking about and I will publish it. For the feature, if you could default it to log, much appreciated.