aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-04-17 13:56:01 -0700
committerMartin Braun <martin.braun@ettus.com>2017-04-17 16:14:46 -0700
commitc936fed335eff0362514feb92ede25410848f554 (patch)
treeb0d93650a29342d98a70312cc4331e03eabcf785 /host
parent005b19ccc4d6794ed3ac8c9164a965b3a771d7d6 (diff)
downloaduhd-c936fed335eff0362514feb92ede25410848f554.tar.gz
uhd-c936fed335eff0362514feb92ede25410848f554.tar.bz2
uhd-c936fed335eff0362514feb92ede25410848f554.zip
logging: UHD_HERE() now also prints current function (gcc only)
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/utils/log.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/host/include/uhd/utils/log.hpp b/host/include/uhd/utils/log.hpp
index ce6ce16e7..9cc400f7c 100644
--- a/host/include/uhd/utils/log.hpp
+++ b/host/include/uhd/utils/log.hpp
@@ -198,9 +198,14 @@ namespace uhd {
#define UHD_LOGGER_FATAL(component) _UHD_LOG_INTERNAL(component, uhd::log::fatal)
+#if defined(__GNUG__)
//! Helpful debug tool to print site info
#define UHD_HERE() \
+ UHD_LOGGER_DEBUG("DEBUG") << __FILE__ << ":" << __LINE__ << " (" << __PRETTY_FUNCTION__ << ")";
+#else
+#define UHD_HERE() \
UHD_LOGGER_DEBUG("DEBUG") << __FILE__ << ":" << __LINE__;
+#endif
//! Helpful debug tool to print a variable
#define UHD_VAR(var) \