Read the log file backend FS

Hello Nordic team, 

I want to be able to save the log into a file and then read it in order to send it's content via HID.

I've managed to make the log back end FS work (I can see the file's size increasing).

But when I want to read it's content I get an hard fault.

I think I need to stop the log to be written to the file before reading it.

Is there a way to do so or a specific function for this case ? 

I didn't find anything yet on zephyr repo neither on the devzone Q&A.

Thanks in advance.

Martin.

Parents
  • Hi Martin,

    I'm facing a similar problem.

    What I'm trying to achieve is to

    • Disable logging
    • Delete old log file and create new log file (or truncate the existing file)
    • Enable logging

    And for the same reasons you describe(the file_t structure inside the logging backend), I'm unable to cleanly delete/truncate the log file.

    Did you find a solution to your issue?

    Thanks in advance,

    Mehdi

Reply
  • Hi Martin,

    I'm facing a similar problem.

    What I'm trying to achieve is to

    • Disable logging
    • Delete old log file and create new log file (or truncate the existing file)
    • Enable logging

    And for the same reasons you describe(the file_t structure inside the logging backend), I'm unable to cleanly delete/truncate the log file.

    Did you find a solution to your issue?

    Thanks in advance,

    Mehdi

Children
No Data
Related