I have a certain device on ESP32 that resets itself every random number of days (1..10 days). I know the last reset reason from this function:
and it's this enum:
Unfortunately, it doesn't tell me anything specific.
I can't wait that long sitting with a laptop with a serial connected, and hunt for something interesting in the logs....
Hence my question:
- how to log every printf, every Serial.printf(), every macro logging to a file?
I read something about the LittleFS file system, the API seems quite simple, opening a file, adding something and closing it is rather trivial. But this will only take care of my own application. The libraries used in the app may log data differently, anyway I don't want to modify their code. The functions provided in the SDK itself also log something, and I won't be able to save it to a file either...
(I'm leaving aside the aspect of increased non-volatile memory usage, such a temporary cost I can accept)
What to do? How to live?
Code: Arduino
and it's this enum:
Code: Arduino
Unfortunately, it doesn't tell me anything specific.
I can't wait that long sitting with a laptop with a serial connected, and hunt for something interesting in the logs....
Hence my question:
- how to log every printf, every Serial.printf(), every macro logging to a file?
I read something about the LittleFS file system, the API seems quite simple, opening a file, adding something and closing it is rather trivial. But this will only take care of my own application. The libraries used in the app may log data differently, anyway I don't want to modify their code. The functions provided in the SDK itself also log something, and I won't be able to save it to a file either...
(I'm leaving aside the aspect of increased non-volatile memory usage, such a temporary cost I can accept)
What to do? How to live?