diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-03-29 16:36:29 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-03-30 14:22:33 -0700 |
commit | 9dddec48e7f5516e0c603d3eb540a169b50fa5a9 (patch) | |
tree | 92c0b5835a769d4f82552ff6f5df0f5c8e0fdafe /host/lib/rfnoc/blockdef_xml_impl.cpp | |
parent | ffeeb0362beb1368966a2ab54a2c2317485f504a (diff) | |
download | uhd-9dddec48e7f5516e0c603d3eb540a169b50fa5a9.tar.gz uhd-9dddec48e7f5516e0c603d3eb540a169b50fa5a9.tar.bz2 uhd-9dddec48e7f5516e0c603d3eb540a169b50fa5a9.zip |
rfnoc: Update logging in some blocks
Updated the following blocks and components: Radio, DmaFIFO,
block_ctrl_base and node_ctrl_base, blockdef_xml_impl, device3_impl.
No functional changes.
- Demoted some log messages
- Consistent log style (use unique_id())
- Some adaptation of coding style where close to log statements
Diffstat (limited to 'host/lib/rfnoc/blockdef_xml_impl.cpp')
-rw-r--r-- | host/lib/rfnoc/blockdef_xml_impl.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/host/lib/rfnoc/blockdef_xml_impl.cpp b/host/lib/rfnoc/blockdef_xml_impl.cpp index d8f749aa0..50faf6905 100644 --- a/host/lib/rfnoc/blockdef_xml_impl.cpp +++ b/host/lib/rfnoc/blockdef_xml_impl.cpp @@ -213,7 +213,9 @@ public: } } } catch (std::exception &e) { - UHD_LOGGER_WARNING("RFNOC") << "has_noc_id(): caught exception " << e.what() ; + UHD_LOGGER_WARNING("RFNOC") + << "has_noc_id(): caught exception " << e.what() + << " while parsing file: " << filename.string(); return false; } return false; @@ -223,7 +225,11 @@ public: _type(type), _noc_id(noc_id) { - //UHD_LOGGER_INFO("RFNOC") << "Reading XML file: " << filename.string().c_str() ; + UHD_LOGGER_DEBUG("RFNOC") << + boost::format("Reading XML file %s for NOC ID 0x%08X") + % filename.string().c_str() + % noc_id + ; read_xml(filename.string(), _pt); try { // Check key is valid @@ -352,7 +358,8 @@ public: arg["type"] = "string"; } if (not arg.is_valid()) { - UHD_LOGGER_WARNING("RFNOC") << boost::format("Found invalid argument: %s") % arg.to_string() ; + UHD_LOGGER_WARNING("RFNOC") + << "Found invalid argument: " << arg.to_string(); is_valid = false; } args.push_back(arg); @@ -408,15 +415,14 @@ blockdef::sptr blockdef::make_from_noc_id(uint64_t noc_id) std::vector<fs::path> valid; // Check if any of the paths exist - for(const fs::path &base_path: paths) { + for (const auto& base_path : paths) { fs::path this_path = base_path / XML_BLOCKS_SUBDIR; if (fs::exists(this_path) and fs::is_directory(this_path)) { valid.push_back(this_path); } } - if (valid.empty()) - { + if (valid.empty()) { throw uhd::assertion_error( "Failed to find a valid XML path for RFNoC blocks.\n" "Try setting the enviroment variable UHD_RFNOC_DIR " @@ -425,7 +431,7 @@ blockdef::sptr blockdef::make_from_noc_id(uint64_t noc_id) } // Iterate over all paths - for(const fs::path &path: valid) { + for (const auto& path : valid) { // Iterate over all .xml files fs::directory_iterator end_itr; for (fs::directory_iterator i(path); i != end_itr; ++i) { |