aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorLane Kolbly <lane.kolbly@ni.com>2022-02-23 17:04:48 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2022-03-11 09:10:04 -0600
commit7484b4f095e3bf7c16fc2f91dc1a78f04397bf01 (patch)
tree03954f38370ba6e96acdac6eff6de271c3250195 /host/include
parent6d58b692e4d26f662e6b2317e9c65043d398f00e (diff)
downloaduhd-7484b4f095e3bf7c16fc2f91dc1a78f04397bf01.tar.gz
uhd-7484b4f095e3bf7c16fc2f91dc1a78f04397bf01.tar.bz2
uhd-7484b4f095e3bf7c16fc2f91dc1a78f04397bf01.zip
host: test: Add UHD_UNITTEST_LOG_LEVEL override
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/utils/log.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/host/include/uhd/utils/log.hpp b/host/include/uhd/utils/log.hpp
index 7b76ec075..2ad7f5528 100644
--- a/host/include/uhd/utils/log.hpp
+++ b/host/include/uhd/utils/log.hpp
@@ -9,6 +9,7 @@
#include <uhd/config.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <boost/optional.hpp>
#include <iomanip>
#include <iostream>
#include <ostream>
@@ -122,6 +123,12 @@ enum severity_level {
off = 6, /**< logging is turned off */
};
+/*! Parses a `severity_level` from a string. If a value could not be parsed,
+ * returns none.
+ */
+boost::optional<uhd::log::severity_level> UHD_API parse_log_level_from_string(
+ const std::string& log_level_str);
+
/*! Logging info structure
*
* Information needed to create a log entry is fully contained in the