mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
736808828d
This commit introduces a verbose logging feature in the mDNS module to aid in development and debugging by providing detailed logs of mDNS traffic. The feature is enabled at build-time via the config option `OPENTHREAD_CONFIG_MULTICAST_DNS_VERBOSE_LOGGING_ENABLE` (mapping to the `OT_MDNS_VERBOSE` CMake option). When enabled, logging can be controlled at run-time using the new `otMdnsSetVerboseLoggingEnabled()` API and the corresponding `mdns verboselogging` CLI command. The initial state on startup can be configured using `OPENTHREAD_CONFIG_MULTICAST_DNS_DEFAULT_VERBOSE_LOGGING_STATE` (mapping to the `OT_MDNS_VERBOSE_STATE` CMake option). When active, this feature logs the content of every sent and received mDNS message, including the header, questions, and all resource records. The logs are emitted at the `OT_LOG_LEVEL_NONE` level to ensure they are always captured, regardless of the active log level configuration.