-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mention the hierarchical namespace for logging #2786
Conversation
docs/guide/configuration/logging.md
Outdated
``` | ||
|
||
## Defining levels for specific namespace hierarchy | ||
The log levels defined in `log_namespaced_levels` will apply to the namespace itself and all namespaces below unless explicitely configured. | ||
In addition to the regex based debug filter [#preventing-specific-namespaces-from-being-logged] it allows to fine tune your logging needs to great detail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The log levels defined in
log_namespaced_levels
will apply to the namespace itself and all namespaces below unless explicitely configured.
In addition to the regex based debug filter [#preventing-specific-namespaces-from-being-logged] it allows to fine tune your logging needs to great detail.
=>
Any log level defined in log_namespaced_levels
will apply to the namespace itself and all namespaces below it, unless explicitly configured.
Regex part is described below and only applies to debug
, so I don't think we need to mention it here.
docs/guide/configuration/logging.md
Outdated
log_level: warning | ||
log_namespaced_levels: | ||
'zhc': info | ||
'zhc:legacy:fz' : debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
advanced:
log_level: warning
log_namespaced_levels:
zhc: info
zhc:legacy:fz: debug
(same at the top, can remove the quotes wrapping namespace)
docs/guide/configuration/logging.md
Outdated
|
||
- All namespaces bellow `zhc` will be logged as info | ||
- Except all namespaces bellow `zhc:legacy:fz` that will be logged as debug | ||
- All the rest uses the `warning` level` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- All namespaces bellow `zhc` will be logged as info
- Except all namespaces bellow `zhc:legacy:fz` that will be logged as debug
- All the rest uses the `warning` level`
=>
- `zhc` and below namespaces will be logged as `info` (examples: `zhc`, `zhc:ota:common`, `zhc:legacy:tz`)
- `zhc:legacy:fz` and below namespaces will be logged as `debug` (examples: `zhc:legacy:fz`, `zhc:legacy:fz:tuya`)
- Other unspecified namespaces will use `log_level`, in this case, `warning` (examples: `z2m:mqtt`, `zh:zstack`)
Thanks! |
Documents hierarchical namespace log levels
Koenkk/zigbee2mqtt#22859