aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
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