aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/lib/utils/log.cpp18
-rw-r--r--host/lib/version.cpp11
2 files changed, 18 insertions, 11 deletions
diff --git a/host/lib/utils/log.cpp b/host/lib/utils/log.cpp
index e850d1374..3bed85af7 100644
--- a/host/lib/utils/log.cpp
+++ b/host/lib/utils/log.cpp
@@ -20,6 +20,7 @@
#include <uhd/utils/static.hpp>
#include <uhd/utils/paths.hpp>
#include <uhd/transport/bounded_buffer.hpp>
+#include <uhd/version.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/make_shared.hpp>
#include <fstream>
@@ -232,6 +233,23 @@ public:
auto F = boost::make_shared<file_logger_backend>(log_file_target);
_loggers[UHD_FILE_LOGGER_KEY] = [F](const uhd::log::logging_info& log_info){F->log(log_info);};
}
+ std::ostringstream sys_info;
+ sys_info \
+ << "UHD" \
+ << BOOST_PLATFORM << "; "
+ << BOOST_COMPILER << "; "
+ << "Boost_"
+ << BOOST_VERSION << "; "
+ << "UHD_" << uhd::get_version_string();
+ _log_queue.push_with_timed_wait(
+ uhd::log::logging_info(
+ pt::microsec_clock::local_time(),
+ uhd::log::info,
+ __FILE__,
+ __LINE__,
+ sys_info.str(),
+ boost::this_thread::get_id()),
+ 0.25);
// Launch log message consumer
_pop_task = std::make_shared<std::thread>(std::thread([this](){this->pop_task();}));
diff --git a/host/lib/version.cpp b/host/lib/version.cpp
index 2da261af0..2ba2dd0d6 100644
--- a/host/lib/version.cpp
+++ b/host/lib/version.cpp
@@ -21,17 +21,6 @@
#include <boost/version.hpp>
#include <iostream>
-#ifndef UHD_DONT_PRINT_SYSTEM_INFO
-UHD_STATIC_BLOCK(print_system_info){
- UHD_LOGGER_INFO("UHD")
- << BOOST_PLATFORM << "; "
- << BOOST_COMPILER << "; "
- << "Boost_" << BOOST_VERSION << "; "
- << "UHD_" << uhd::get_version_string()
- ;
-}
-#endif
-
std::string uhd::get_version_string(void){
return "@UHD_VERSION@";
}