Skip to content

Commit 668b465

Browse files
committed
doc: matter: Add documentation about detailed logging
This commit updates the documentation about detailed Matter messages logging. Signed-off-by: Łukasz Duda <[email protected]>
1 parent a952fda commit 668b465

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

doc/nrf/protocols/matter/getting_started/advanced_kconfigs.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ Logging configuration
7272
Logging is handled with the :kconfig:option:`CONFIG_LOG` option.
7373
This option enables logging for both the stack and Zephyr's :ref:`zephyr:logging_api` API.
7474

75+
Logging level configuration
76+
---------------------------
77+
7578
Zephyr allows you to configure log levels of different software modules independently.
7679
To change the log level configuration for the Matter module, set one of the available options:
7780

@@ -83,6 +86,56 @@ To change the log level configuration for the Matter module, set one of the avai
8386
.. note::
8487
:kconfig:option:`CONFIG_MATTER_LOG_LEVEL_WRN` is not used in Matter.
8588

89+
Detailed message logging
90+
------------------------
91+
92+
You can enable detailed logging of Matter interaction messages using the :kconfig:option:`CONFIG_CHIP_IM_PRETTY_PRINT` Kconfig option.
93+
94+
When enabled, this option increases the verbosity of the logs by including protocol-level details such as:
95+
96+
* Cluster ID
97+
* Endpoint ID
98+
* Attribute ID or Command ID
99+
* Payload contents for interaction messages (for example Read Request or Invoke Request)
100+
101+
This is particularly useful for debugging and understanding communication flows within the Matter data model.
102+
103+
The following is an example log output showing a ``ConnectNetwork`` command (0x06) from the Network Commissioning cluster (0x31), sent with a ``NetworkID`` of ``0x1111111122222222``.
104+
105+
.. code-block:: text
106+
107+
[DMG]InvokeRequestMessage =
108+
[DMG]{
109+
[DMG] suppressResponse = false,
110+
[DMG] timedRequest = false,
111+
[DMG] InvokeRequests =
112+
[DMG] [
113+
[DMG] CommandDataIB =
114+
[DMG] {
115+
[DMG] CommandPathIB =
116+
[DMG] {
117+
[DMG] EndpointId = 0x0,
118+
[DMG] ClusterId = 0x31,
119+
[DMG] CommandId = 0x6,
120+
[DMG] },
121+
[DMG]
122+
[DMG] CommandFields =
123+
[DMG] {
124+
[DMG] 0x0 = [
125+
[DMG] 0x11, 0x11, 0x11, 0x11, 0x22, 0x22, 0x22, 0x22,
126+
[DMG] ] (8 bytes)
127+
[DMG] 0x1 = lu (unsigned),
128+
[DMG] },
129+
[DMG] },
130+
[DMG]
131+
[DMG] ],
132+
[DMG]
133+
[DMG] InteractionModelRevision = 11
134+
[DMG]},
135+
136+
.. note::
137+
This option requires the debug log level :kconfig:option:`CONFIG_MATTER_LOG_LEVEL_DBG` to be enabled and :kconfig:option:`CONFIG_CHIP_LOG_SIZE_OPTIMIZATION` to be disabled.
138+
86139
.. _ug_matter_configuring_optional_shell:
87140

88141
Matter shell commands

0 commit comments

Comments
 (0)