Browse Source

px4_log: flush each line

Without this fix all PX4 output is buffered and presented at the very
end of a scripted MAVSDK test which makes the log hard to read.
sbg
Julian Oes 5 years ago
parent
commit
1cb706c411
  1. 6
      platforms/common/px4_log.cpp

6
platforms/common/px4_log.cpp

@ -136,6 +136,12 @@ __EXPORT void px4_log_modulename(int level, const char *moduleName, const char * @@ -136,6 +136,12 @@ __EXPORT void px4_log_modulename(int level, const char *moduleName, const char *
orb_publish(ORB_ID(log_message), orb_log_message_pub, &log_message);
}
#ifdef CONFIG_ARCH_BOARD_PX4_SITL
// Without flushing it's tricky to see stdout output when PX4 is started by
// a script like for the MAVSDK tests.
fflush(out);
#endif
}
__EXPORT void px4_log_raw(int level, const char *fmt, ...)

Loading…
Cancel
Save