nebulous / infinitude

Open control of Carrier/Bryant thermostats
MIT License
225 stars 50 forks source link

Allow specifying the loglevel with the LOGLEVEL envvar #135

Closed mamarley closed 2 years ago

mamarley commented 2 years ago

Printing 3 lines every time the thermostat makes a request every 12 seconds in production seems a bit excessive, so allow for the loglevel to be specified at runtime to reduce logging verbosity. Also, increase the severity of a few serious-looking log statements so they still get printed even when higher log levels are specified.

nebulous commented 2 years ago

This looks good, but could you add a README update to reflect the new option?

mamarley commented 2 years ago

Done. I also decreased the default severity to "trace" to match the default documented in https://docs.mojolicious.org/Mojo/Log#level (to avoid changing the default behavior).