Skip to content
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

logging: rpc: log history support #19261

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

Damian-Nordic
Copy link
Contributor

@Damian-Nordic Damian-Nordic commented Dec 4, 2024

Add initial code for supporting the log history, that is, the mode of nRF RPC logging library in which log messages are stored in a ring buffer, and nRF RPC commands can be used for configuring and fetching the log history.

The rationale for supporting this mode is to reduce the nRF RPC traffic so that the bandwidth is available for higher priority tasks, while preserving the possibility to analyse the logs when an issue occurs.

This commit adds the support for saving the log messages in the ring buffer, fetching the log history, and setting the maximum level of saved messages.

@Damian-Nordic Damian-Nordic requested review from a team as code owners December 4, 2024 14:36
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 4, 2024
@Damian-Nordic Damian-Nordic removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 4, 2024
@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publish GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Dec 4, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 2

Inputs:

Sources:

sdk-nrf: PR head: daac296a7fd36a9bab32db0b09f6bac020638206

more details

sdk-nrf:

PR head: daac296a7fd36a9bab32db0b09f6bac020638206
merge base: a97ba919e45db56a60938d89ded2cb31920f985e
target head (main): deb0ad9452c9a1a20ced11f43c659950973accc9
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (10)
include
│  ├── logging
│  │  │ log_rpc.h
samples
│  ├── nrf_rpc
│  │  ├── protocols_serialization
│  │  │  ├── client
│  │  │  │  ├── src
│  │  │  │  │  │ log_rpc_shell.c
│  │  │  ├── server
│  │  │  │  ├── snippets
│  │  │  │  │  ├── log_rpc
│  │  │  │  │  │  │ log_rpc.conf
subsys
│  ├── logging
│  │  ├── CMakeLists.txt
│  │  ├── Kconfig
│  │  ├── log_backend_rpc.c
│  │  ├── log_backend_rpc_history.h
│  │  ├── log_backend_rpc_history_ram.c
│  │  ├── log_forwarder_rpc.c
│  │  │ log_rpc_group.h

Outputs:

Toolchain

Version: b77d8c1312
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:b77d8c1312_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 60
  • ✅ Integration tests
    • ✅ test-fw-nrfconnect-rpc
    • ✅ test-fw-nrfconnect-ps
Disabled integration tests
    • desktop52_verification
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

Copy link
Contributor

@alxelax alxelax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just a couple of questions.

Add initial code for supporting the log history, that is,
the mode of nRF RPC logging library in which log messages
are stored in a ring buffer, and nRF RPC commands can be
used for configuring and fetching the log history.

The rationale for supporting this mode is to reduce the
nRF RPC traffic so that the bandwidth is available for
higher priority tasks, while preserving the possibility
to analyse the logs when an issue occurs.

This commit adds the support for saving the log messages
in the ring buffer, fetching the log history, and setting
the maximum level of saved messages.

Signed-off-by: Damian Krolik <[email protected]>
@Damian-Nordic Damian-Nordic changed the title logging: rpc: initial history support logging: rpc: log history support Dec 9, 2024
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 9, 2024
@Damian-Nordic Damian-Nordic requested a review from alxelax December 9, 2024 16:56
@Damian-Nordic Damian-Nordic removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 10, 2024
Copy link
Contributor

@kderda kderda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, found two nits which you can apply or ignore :)

@nordicjm nordicjm merged commit 7761b16 into nrfconnect:main Dec 11, 2024
14 checks passed
@Damian-Nordic Damian-Nordic deleted the log-rpc-history branch December 11, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants