Skip to content

Commit 0e1b1af

Browse files
authored
Add set_default_level documentation
1 parent da19c3f commit 0e1b1af

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

source/_components/logger.markdown

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ logo: home-assistant.png
1111
ha_category: "Utility"
1212
---
1313

14-
The logger component lets you define the level of logging activities in Home Assistant.
14+
The `logger` component lets you define the level of logging activities in Home Assistant.
1515

16-
To enable the logger in your installation, add the following to your `configuration.yaml` file:
16+
To enable the `logger` component in your installation, add the following to your `configuration.yaml` file:
1717

1818
To have a full log and log everything only this entry is needed (without any qualifier):
1919
```yaml
@@ -54,10 +54,23 @@ Possible log severities are:
5454
- debug
5555
- notset
5656
57+
### {% linkable_title Service `set_default_level` %}
58+
59+
You can alter the default log level (for components without a specified log
60+
level) using the service `logger.set_default_level`.
61+
62+
An example call might look like this:
63+
64+
```yaml
65+
service: logger.set_default_level
66+
data:
67+
level: info
68+
```
69+
5770
### {% linkable_title Service `set_level` %}
5871

5972
You can alter log level for one or several components using the service
60-
``logger.set_level``. It accepts the same format as ``logs`` in the configuration.
73+
`logger.set_level`. It accepts the same format as `logs` in the configuration.
6174

6275
An example call might look like this:
6376

@@ -68,15 +81,18 @@ data:
6881
homeassistant.components.media_player.yamaha: debug
6982
```
7083

71-
The log information are stored in the [configuration directory](/docs/configuration/) as `home-assistant.log` and you can read it with the command-line tool `cat` or follow it dynamically with `tail -f`.
84+
The log information are stored in the [configuration directory](/docs/configuration/)
85+
as `home-assistant.log` and you can read it with the command-line tool `cat` or
86+
follow it dynamically with `tail -f`.
7287

7388
If you are a Hassbian user you can use the example below:
7489

7590
```bash
7691
$ tail -f /home/homeassistant/.homeassistant/home-assistant.log
7792
```
7893

79-
If you are a Hass.io user you can use the example below, whenlogged in through the ssh addon:
94+
If you are a Hass.io user you can use the example below, when logged in through
95+
the [SSH add-on](/addons/ssh/):
8096

8197
```bash
8298
$ tail -f /config/home-assistant.log

0 commit comments

Comments
 (0)