replace all cout with log_f

This commit is contained in:
Nam Tran
2020-11-04 20:40:44 -06:00
parent b9f5c2f405
commit b8c754b651

View File

@@ -79,12 +79,11 @@ int main(int argc, char const* argv[])
uint8_t version = wordData[0] & 0xFF;
uint16_t spill_id = (wordData[1] & 0x00FFFF00) >> 8;
uint8_t channel_count = (wordData[1]) & 0x000000FF;
if (verbose) {
std::cout << "board " << static_cast<uint32_t>(board_id) <<
", version " << static_cast<uint32_t>(version) <<
", spill " << static_cast<uint32_t>(spill_id) <<
", channel_count " << static_cast<uint32_t>(channel_count)<< std::endl;
}
LOG_IF_F(INFO, verbose, "board %u, version %u, spill %u, channel_count %u",
static_cast<uint32_t>(board_id),
static_cast<uint32_t>(version),
static_cast<uint32_t>(spill_id),
static_cast<uint32_t>(channel_count));
if ((board_id > 4) || (board_id < 1) || (version != 1) || (channel_count > 8) || (channel_count < 1)) {
bad_data = true;
@@ -104,8 +103,7 @@ int main(int argc, char const* argv[])
}
void signalHandler( int signum ) {
std::cout << "Interrupt signal (" << signum << ") received, exiting..."
<< std::endl;
LOG_F(WARNING, "Interrupt signal (%d) received, exiting...", signum);
running = false;
}