I am wondering why I am seeing the following behaviour using SerialLogHandler with a P1 device, deviceOS 3.3.0. I want to explicitly start my cloud connection in loop(), and hence use Semi-automatic mode. However, I am doing quite a bit of initialization in setup(), and would like to log the progress/results. However, I am not seeing any Log messages coming through in setup(), only once loop() starts. Any ideas ? Simplified example code is below:
SYSTEM_MODE(SEMI_AUTOMATIC);
SYSTEM_THREAD(ENABLED);
SerialLogHandler logHandler;
void setup() {
Log.info("Setup entered"); // this does not work
pinMode(D7,OUTPUT);
Log.info("Setup complete"); // this does not work
}
void loop() {
digitalWrite(D7,TRUE);
Log.info("LED on"); // this works
delay(2000);
digitalWrite(D7,FALSE);
Log.info("LED off"); // this works
delay(2000);
}