Skip to content

Commit

Permalink
mention the hierarchical namespace for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoz committed Jun 3, 2024
1 parent b9fe59d commit e8f1f10
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/guide/configuration/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The log-level can be adjusted at runtime, see [MQTT Topics and Messages](../usag
advanced:
# Optional: Logging level, options: debug, info, warning, error (default: info)
log_level: info
# Optional: Set individual log levels for certain namespaces (default: {})
# Optional: Set log levels for certain namespaces hierarchies (default: {})
log_namespaced_levels:
z2m:mqtt: warning
# Optional: log timestamp format (default: shown below)
Expand Down Expand Up @@ -53,9 +53,22 @@ Logging can have a significant impact on MQTT traffic. For that reason, only `in
advanced:
log_level: info
log_namespaced_levels:
z2m:mqtt: warning
'z2m:mqtt': warning
```

## Defining levels for specific namespace hierarchy
The log levels defined in `log_namespaced_levels` will apply to the namespace in a hierarchical manner (with the same beginning).
In addition to the regex based debug filter [#preventing-specific-namespaces-from-being-logged] it allows to fine tune your logging needs.
```yaml
advanced:
log_level: debug
log_namespaced_levels:
'zh:zstack': warning
'zhc': warning
'zhc:legacy:fz:moes' : debug
'z2m': info
```

## Debugging

In case Zigbee2MQTT isn't working as expected the following tips can help you in finding the problem.
Expand Down

0 comments on commit e8f1f10

Please sign in to comment.