Skip to content

Commit 452ef7e

Browse files
Improve readability of Log Levels (#5735)
* Improved readability of Log Levels Formatted log levels in a table instead of a bullet list to make the association of the level and description more clear. * Removed HTML line break * Added table header * Cleanup * Cleanup --------- Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
1 parent 65369f6 commit 452ef7e

File tree

1 file changed

+12
-36
lines changed

1 file changed

+12
-36
lines changed

content/components/logger.md

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -126,42 +126,18 @@ the original ESP32 or ESP8266) continue to use USB-to-serial bridge ICs for comm
126126

127127
Possible log levels are (sorted by severity):
128128

129-
- `NONE`
130-
131-
- No messages are logged.
132-
133-
- `ERROR`
134-
135-
- With this log level, only errors are logged. Errors are issues that prevent the ESP from working
136-
137-
correctly. Color: red
138-
139-
- `WARN`
140-
141-
- With this log level, warnings and errors are logged. Warnings are issues like invalid readings from
142-
143-
sensors that ESPHome can recover from. Color: yellow
144-
145-
- `INFO`
146-
147-
- With this log level, everything up to info messages are logged; so errors, warnings and info. Color: green
148-
149-
- `DEBUG` (**Default**)
150-
151-
- Everything up to this log level is logged. Debug messages include the current readings from a sensor
152-
153-
and status messages. Color: cyan
154-
155-
- `VERBOSE`
156-
157-
- Like debug, but a few more messages that are usually deemed to be spam are also included. Color: grey
158-
159-
- `VERY_VERBOSE`
160-
161-
- All internal messages are logged. Including all the data flowing through data buses like
162-
163-
I²C, SPI or UART. Warning: May cause the device to slow down and have trouble staying
164-
connecting due to amount of generated messages. Color: white
129+
| Level | Color | Description |
130+
| ------------------ | ------ | ----------- |
131+
| `NONE` | | No messages are logged. |
132+
| `ERROR` | Red | Only errors are logged. Errors prevent the ESP from working correctly. |
133+
| `WARN` | Yellow | Warnings and errors. Warnings are recoverable issues like invalid sensor readings. |
134+
| `INFO` | Green | Errors, warnings and info messages are logged. |
135+
| `DEBUG` (default) | Cyan | Everything up to debug. Includes sensor readings and status messages. |
136+
| `VERBOSE` | Gray | Like debug, but includes additional messages usually deemed to be spam. |
137+
| `VERY_VERBOSE` | White | All internal messages including data flowing through I²C, SPI and UART buses. |
138+
139+
> [!WARNING]
140+
> Using `VERY_VERBOSE` can significantly impact device performance and may cause connection instability.
165141

166142
{{< anchor "logger-manual_tag_specific_levels" >}}
167143

0 commit comments

Comments
 (0)