diff --git a/lib/decode_mac.cc b/lib/decode_mac.cc index 3f64cfd..bb61be0 100644 --- a/lib/decode_mac.cc +++ b/lib/decode_mac.cc @@ -147,8 +147,8 @@ class decode_mac_impl : public decode_mac return; } - mylog(boost::format("encoding: %1% - length: %2% - symbols: %3%") % - d_ofdm.encoding % d_frame.psdu_size % d_frame.n_sym); + d_logger->info("encoding: {} - length: {} - symbols: {}", + d_ofdm.encoding, d_frame.psdu_size, d_frame.n_sym); // create PDU pmt::pmt_t blob = pmt::make_blob(out_bytes + 2, d_frame.psdu_size - 4); diff --git a/lib/frame_equalizer_impl.cc b/lib/frame_equalizer_impl.cc index de2ee7c..f476560 100644 --- a/lib/frame_equalizer_impl.cc +++ b/lib/frame_equalizer_impl.cc @@ -360,8 +360,8 @@ bool frame_equalizer_impl::parse_signal(uint8_t* decoded_bits) return false; } - mylog(boost::format("encoding: %1% - length: %2% - symbols: %3%") % d_frame_encoding % - d_frame_bytes % d_frame_symbols); + d_logger->info("encoding: {} - length: {} - symbols: {}",d_frame_encoding, + d_frame_bytes, d_frame_symbols); return true; } diff --git a/lib/parse_mac.cc b/lib/parse_mac.cc index 4007a1d..472fda8 100644 --- a/lib/parse_mac.cc +++ b/lib/parse_mac.cc @@ -64,7 +64,7 @@ class parse_mac_impl : public parse_mac int frame_len = pmt::blob_length(d_msg); mac_header* h = (mac_header*)pmt::blob_data(d_msg); - mylog(boost::format("length: %1%") % frame_len); + d_logger->info("length: {}",frame_len); dout << std::endl << "new mac frame (length " << frame_len << ")" << std::endl; dout << "=========================================" << std::endl; diff --git a/lib/sync_long.cc b/lib/sync_long.cc index 11da6d5..0c3f212 100644 --- a/lib/sync_long.cc +++ b/lib/sync_long.cc @@ -113,7 +113,7 @@ class sync_long_impl : public sync_long if (d_offset == SYNC_LENGTH) { search_frame_start(); - mylog(boost::format("LONG: frame start at %1%") % d_frame_start); + d_logger->info("LONG: frame start at {}",d_frame_start); d_offset = 0; d_count = 0; d_state = COPY; diff --git a/lib/sync_short.cc b/lib/sync_short.cc index 55e8b84..cc5e66f 100644 --- a/lib/sync_short.cc +++ b/lib/sync_short.cc @@ -139,7 +139,7 @@ class sync_short_impl : public sync_short void insert_tag(uint64_t item, double freq_offset, uint64_t input_item) { - mylog(boost::format("frame start at in: %2% out: %1%") % item % input_item); + d_logger->info("frame start at in: {} out: {}", item, input_item); const pmt::pmt_t key = pmt::string_to_symbol("wifi_start"); const pmt::pmt_t value = pmt::from_double(freq_offset); diff --git a/lib/utils.h b/lib/utils.h index d1481b8..0c0fc6d 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -35,7 +35,9 @@ using gr::ieee802_11::Encoding; #define mylog(msg) \ do { \ if (d_log) { \ - GR_LOG_INFO(d_logger, msg); \ + std::ostringstream msgx; \ + msgx << msg; \ + GR_LOG_INFO(d_logger, msgx.str()); \ } \ } while (0);