Skip to content

Commit

Permalink
feat(docs): Detail logging and note extra useful options
Browse files Browse the repository at this point in the history
  • Loading branch information
caksoylar committed Sep 5, 2023
1 parent 8087fa3 commit f442776
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/docs/development/usb-logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
:::

Expand Down

0 comments on commit f442776

Please sign in to comment.