feat(docs): Detail logging and note extra useful options

This commit is contained in:
Cem Aksoylar 2023-06-10 17:41:22 -07:00
parent 8087fa3b2b
commit f442776fe2

View file

@ -20,13 +20,16 @@ It is recommended to only enable logging when needed, and not leaving it on by d
## Kconfig
The `CONFIG_ZMK_USB_LOGGING` KConfig value needs to be set, either by copy and pasting into the `app/prj.conf` file, or by running
`west build -t menuconfig` and manually enabling the setting in that UI at `ZMK -> Advanced -> USB Logging`.
The `CONFIG_ZMK_USB_LOGGING` Kconfig enables USB logging. This can be set at the keyboard level, typically in the `config/<your_keyboard>.conf`
file if you are using a [user config repository](user-setup.md). It can also be enabled at the ZMK level using the `app/prj.conf` file, or other
search locations described in the [configuration overview](config/index.md#config-file-locations).
Logging can be further configured using Kconfig described in [the Zephyr documentation](https://docs.zephyrproject.org/3.2.0/services/logging/index.html).
For instance, setting `CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS` to a large value such as `8000` might help catch issues that happen near keyboard
boot, before you can connect to view the logs.
:::note
If you are debugging your own keyboard in your [user config repository](user-setup.md), use
`config/boards/shields/<your_keyboard>/<your_keyboard>.conf` instead of `app/prj.conf`. In Github
Actions, you can search the `Kconfig file` build log to verify the options above have been enabled
In Github Actions, you can check the `<Keyboard> Kconfig file` step output to verify the options above have been enabled
for you successfully.
:::