synesthesiam / rhasspy

Rhasspy voice assistant for offline home automation
https://rhasspy.readthedocs.io
MIT License
948 stars 101 forks source link

[Feature] Add a log level configuration option #87

Closed mathquis closed 4 years ago

mathquis commented 4 years ago

I suggest adding a rhasspy.log_level option in the profile.json file with ERROR, WARNING, INFO, DEBUG values to avoid pushing debug logs in a production setup.

synesthesiam commented 4 years ago

I've added a --log-level command-line argument that can be passed to run-venv.sh or into the Docker image (next version).

There's a chicken and egg problem with putting the log level in the profile. By the time the profile is loaded, major parts of Rhasspy have already been loaded and have attached loggers. I need to do some more digging into Python's logging infrastructure before moving further.

mathquis commented 4 years ago

A command line argument is perfect. 😊

Can this be passed to Docker container directly via an environment variables also ? The command line arg can override the env var if present.

Not a priority though 😁

synesthesiam commented 4 years ago

Added RHASSPY_LOG_LEVEL in 2.4.17