@@ -35,6 +35,10 @@ logger:
35
35
- **logs** (*Optional*, mapping): Manually set the log level for a
36
36
specific component or tag. See [Manual Log Levels for more information](#logger-manual_tag_specific_levels).
37
37
38
+ - **runtime_tag_levels** (*Optional*, boolean): Enable runtime per-tag log level changes. This is automatically enabled
39
+ when `logs` is configured or when `logger.set_level` is used with a `tag` parameter. Only needs to be manually
40
+ enabled if calling `set_log_level()` from a lambda or external component. Defaults to `false` (auto-enabled as needed).
41
+
38
42
- **id** (*Optional*, [ID](#config-id)): Manually specify the ID used for code generation.
39
43
40
44
Advanced settings :
@@ -174,6 +178,10 @@ logger:
174
178
mqtt.client: ERROR
175
179
` ` `
176
180
181
+ > [!NOTE]
182
+ > When using `logs`, runtime per-tag log level support is automatically enabled. When this feature is disabled
183
+ > (the default when `logs` is not configured), the logger is optimized for better performance and reduced memory usage.
184
+
177
185
The `level` option controls which log statements are included in the
178
186
firmware. You cannot set a tag to a more detailed level than
179
187
the global one, because log statements with lower severity than that level are not compiled in.
@@ -238,6 +246,11 @@ on_...:
238
246
tag: mqtt.client
239
247
` ` `
240
248
249
+ > [!NOTE]
250
+ > When using `logger.set_level` with a `tag` parameter, runtime per-tag log level support is automatically enabled.
251
+ > If you need to call `set_log_level()` directly from a lambda or external component, you must manually enable
252
+ > `runtime_tag_levels: true` in the logger configuration.
253
+
241
254
# # Logger Automation
242
255
243
256
{{< anchor "logger-on_message" >}}
0 commit comments