Skip to content

Commit 215cab5

Browse files
committed
[troubleshooting] Add log level adjustment documentation
1 parent 4bb9937 commit 215cab5

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

guides/troubleshooting.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,58 @@ If you already have a stack trace but need to decode it, you can use the `ESP St
112112

113113
This tool runs entirely in your browser - no data is sent to any server, ensuring your firmware and debug information remain private.
114114

115+
Adjusting Log Levels for Debugging
116+
-----------------------------------
117+
118+
When troubleshooting issues with your ESPHome device, increasing the log level can provide more detailed information about what's happening internally. This is particularly useful for diagnosing component-specific problems or understanding the data flow between components.
119+
120+
Setting Global Log Level
121+
~~~~~~~~~~~~~~~~~~~~~~~~
122+
123+
To increase the verbosity of logs globally, adjust the ``level`` in your :doc:`logger </components/logger>` configuration:
124+
125+
.. code-block:: yaml
126+
127+
logger:
128+
level: VERBOSE # or VERY_VERBOSE for maximum detail
129+
130+
Available log levels from least to most verbose:
131+
132+
- ``NONE`` - No messages logged
133+
- ``ERROR`` - Only errors
134+
- ``WARN`` - Warnings and above
135+
- ``INFO`` - Informational messages and above
136+
- ``DEBUG`` - Debug messages and above (default)
137+
- ``VERBOSE`` - Detailed debug messages and above
138+
- ``VERY_VERBOSE`` - All internal messages including data bus traffic
139+
140+
.. warning::
141+
142+
Using ``VERY_VERBOSE`` can significantly slow down your device and may cause connectivity issues due to the volume of log messages generated. Use it only for short debugging sessions.
143+
144+
ESP-IDF Framework Log Level
145+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
146+
147+
When using the ESP-IDF framework on :doc:`ESP32 </components/esp32>`, you can also adjust the framework's internal log level to get more detailed information from the underlying system:
148+
149+
.. code-block:: yaml
150+
151+
esp32:
152+
framework:
153+
type: esp-idf
154+
log_level: VERBOSE # Framework log level
155+
156+
Available ESP-IDF log levels: ``NONE``, ``ERROR`` (default), ``WARN``, ``INFO``, ``DEBUG``, ``VERBOSE``
157+
158+
Component-Specific Log Levels
159+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160+
161+
You can also configure log levels for specific components to reduce noise or get more detail from individual components. See the :ref:`logger manual tag-specific log levels <logger-manual_tag_specific_levels>` documentation for detailed information and examples.
162+
163+
.. important::
164+
165+
The global log level determines which messages are compiled into the binary. Component-specific log levels can only reduce verbosity, not increase it beyond the global level. For example, if the global level is ``INFO``, setting a component to ``DEBUG`` will have no effect.
166+
115167
Performance Troubleshooting
116168
---------------------------
117169

0 commit comments

Comments
 (0)