aarons22 / homebridge-bond

Homebridge plugin for Bond
MIT License
64 stars 31 forks source link

Log is overly verbose #93

Closed sandeen closed 4 years ago

sandeen commented 4 years ago

The bond plugin is quite chatty by default as compared to other plugins:

[6/21/2020, 08:28:47] [MyQ2] Garage Door is closed. Battery normal.
[6/21/2020, 08:28:47] [Bond] got value: false
[6/21/2020, 08:28:47] [Bond] got value: 0
[6/21/2020, 08:28:48] [Bond] got value: 1
[6/21/2020, 08:28:48] [Bond] got value: false
[6/21/2020, 08:28:48] [Bond] got value: 0
[6/21/2020, 08:28:48] [Bond] got value: false
[6/21/2020, 08:28:48] [Bond] got value: false
[6/21/2020, 08:28:48] [Bond] got value: false
[6/21/2020, 08:28:48] [Camera-ffmpeg] Snapshot from LivingRoom at 480:270

i.e. there's probably no need for this message here, unless debug is enabled:

             .on('get', (callback) => {
             get()
                 .then((value) => {
-                platform.log(`got value: ${value}`);
                 callback(null, value);
             })

I'd send a PR but it's just a 1-liner to consider. Thanks :)

aarons22 commented 4 years ago

I think this is a fair point. I've updated it in the repo, so it'll be included in the next version. Thanks!

sandeen commented 4 years ago

Thanks!