logger status output: print 'Not logging' if not actually logging

This commit is contained in:
Beat Küng
2017-10-12 16:40:47 +02:00
parent e65547b6af
commit 4da4093839
+7
View File
@@ -208,13 +208,20 @@ int Logger::print_status()
{ {
PX4_INFO("Running in mode: %s", configured_backend_mode()); PX4_INFO("Running in mode: %s", configured_backend_mode());
bool is_logging = false;
if (_writer.is_started(LogWriter::BackendFile)) { if (_writer.is_started(LogWriter::BackendFile)) {
PX4_INFO("File Logging Running"); PX4_INFO("File Logging Running");
print_statistics(); print_statistics();
is_logging = true;
} }
if (_writer.is_started(LogWriter::BackendMavlink)) { if (_writer.is_started(LogWriter::BackendMavlink)) {
PX4_INFO("Mavlink Logging Running"); PX4_INFO("Mavlink Logging Running");
is_logging = true;
}
if (!is_logging) {
PX4_INFO("Not logging");
} }
return 0; return 0;