You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it is now the log backend fs allows to write the log into a file and overwrite it.
But it doesn't provide all function from little fs.
This is not very convenient if you want to do some operation on the log file from the application at run-time.
It would be nice to have some kind of basic function like delete_content or read accessible from the app.
Right now a way to do it is by create your own struct fs_file_t with the right path and then you can read it's content.
But since this struct is not linked with the one in log_back_end.c , you can not truncate nor delete the file.
I don't have the solution yet but some ideas :
Create a reset function in the log_backend API that allow to delete the content of the log_backend_fs
Use the void* ctx pointer to give access to the struct fs_file_t of the log_backend_fs.c file.
Create another log_backend_fs driver that need to be instanciate with a struct fs_file_t* at initialisation.
All of those 3 have major drawbacks and I haven't find a elegant solution yet.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As it is now the log backend fs allows to write the log into a file and overwrite it.
But it doesn't provide all function from little fs.
This is not very convenient if you want to do some operation on the log file from the application at run-time.
It would be nice to have some kind of basic function like
delete_content
orread
accessible from the app.Right now a way to do it is by create your own
struct fs_file_t
with the right path and then you can read it's content.But since this struct is not linked with the one in log_back_end.c , you can not truncate nor delete the file.
I don't have the solution yet but some ideas :
void* ctx
pointer to give access to thestruct fs_file_t
of the log_backend_fs.c file.log_backend_fs
driver that need to be instanciate with astruct fs_file_t*
at initialisation.All of those 3 have major drawbacks and I haven't find a elegant solution yet.
Beta Was this translation helpful? Give feedback.
All reactions