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

Store logs in persistent storage (ext. flash, SD card) #26296

Closed
koffes opened this issue Jun 19, 2020 · 1 comment
Closed

Store logs in persistent storage (ext. flash, SD card) #26296

koffes opened this issue Jun 19, 2020 · 1 comment
Labels
Enhancement Changes/Updates/Additions to existing features

Comments

@koffes
Copy link
Collaborator

koffes commented Jun 19, 2020

Is your enhancement proposal related to a problem? Please describe.
All log mechanisms today requires the user/developer to have either RTT/Serial/SWO connected to the board to see log output. Also, if you desire to store logs, this has to be done on the host side of the log link.

In most cases this is fine, but in some situations it would be highly desirable to place logs in on-board persistent storage:
A: A customer experiences an error, but did not have a backend connected. With this solution the log can be retrieved using a debugger from internal flash, USB from external flash or an SD card can be read over USB or put into a PC.

B: Logging from small portable devices. In many cases you have a portable device you want logging where it is cumbersome or impossible to have USB/UART/RTT connected.
E.g. logging battery level over a long period of time.

Describe the solution you'd like
LOG_BACKEND_PERSISTENT_STORAGE or
LOG_BACKEND_EXT_FLASH
LOG_BACKEND_SD_CARD
(LOG_BACKEND_INT_FLASH)

If the corresponding KConfig settings have not been made, you will get an error.
You will of course also have to set a file system, have a filename for the log and some kind of full storage handling.

Alternatively
As a first step, provide a LOG_BACKEND_USER or LOG_BACKEND_BLANK. When enabled, logs will e.g. go to UART and the USER backend at the same time. The user can then handle logs in the USER log callback as desired and the specifics of storing to flash or SD card can be left to the user.

@koffes koffes added the Enhancement Changes/Updates/Additions to existing features label Jun 19, 2020
@koffes koffes closed this as completed Jun 19, 2020
@koffes
Copy link
Collaborator Author

koffes commented Jun 19, 2020

Duplicate of #26295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

1 participant