I would like to utilize the logger class, but I am running into a lot of stability issues when I use it. Here is an example that will trigger an SOS crash every time. This is reproduced on Proton and Duo.
The example below using the ArduinoJson library is just one example. There are other situations that the logger will cause an SOS crash. This example just seemed pretty straight forward and not clear why an error would occur.
SOS code is Stack Overflow.
Any ideas?
#include <ArduinoJson.h>
SerialLogHandler logHandler(115200);
Logger appLogger("app");
SYSTEM_MODE(AUTOMATIC);
Timer periodicTimer(5000, worker);
void setup() {
appLogger("Hello");
periodicTimer.start();
}
void worker() {
appLogger("Later");
//Serial.println("Later");
StaticJsonBuffer<200> jsonBuffer;
JsonObject& collectorAttributes = jsonBuffer.createObject();
}
void loop() {
}