-
Notifications
You must be signed in to change notification settings - Fork 13
Description
I would love to see an option to save the logs to a local file (i.e. using VFS), so the logs are actually written to an internal filesystem such as FAT, SPIFFS, LittleFS, etc
How do you retrieve the logging that is written to a local file?
I think it should be left up to the application to provide the method to both write to the file and for the user to retrieve the file(s).
I.e. it could be stored on a SD card and the card removed to retrieve the file.
Or store it to internal flash and download it from an embedded HTTP server. I.e. GET http://192.168.4.1/internalfs/syslog.txt
A modular approach would have this component only provide the core functionality and an API for the application to extend. Then several example projects can demonstrate a few implementations. I could provide an example project that makes the file stored to embedded flash (i.e. FAT) partition and make it available to download via an embedded HTTP server.
Perhaps a useful feature for the core component would be to manage the log file rotation. I.e. how many log files are allowed to be kept, how large a single file can become, and the file naming convention.
I would also like to be able to tee or split (clone) the log to multiple sinks. I.e. it goes to the UART, and is available to stream via one of the supported streaming protocols, and is also written to local file.