Logger available namespaces (#11747)

* logger available namespaces

Explained how users can know against which namespaces they may declare a loglevel, and also mention docker command to view logs

* added follow to docker log command

to match other environment commands as requested by frenck
This commit is contained in:
Art M. Gallagher 2020-01-15 17:44:37 +00:00 committed by Franck Nijhof
parent 13ab5fc254
commit d26f4f95c2

View File

@ -88,7 +88,11 @@ where **namespace** is the *<component_namespace>* currently logging.
{% endconfiguration %}
In the example, do note the difference between 'glances_api' and 'homeassistant.components.glances' namespaces,
both of which are at root. They are logged by different APIs.
both of which are at root. They are logged by different APIs.
If you want to know the namespaces in your own environment then check your log files on startup.
You will see INFO log messages from homeassistant.loader stating `loaded <component> from <namespace>`.
Those are the namespaces available for you to set a `log level` against.
### Log Levels
@ -146,3 +150,12 @@ the [SSH add-on](/addons/ssh/):
```bash
$ tail -f /config/home-assistant.log
```
On Docker you can use your host command line directly - follow the logs dynamically with:
```bash
# follow the log dynamically
docker logs --follow MY_CONTAINER_ID
```
To see other options use `--help` instead, or simply leave with no options to display the entire log.