diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-04-17 13:56:01 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-04-17 16:14:46 -0700 |
commit | c936fed335eff0362514feb92ede25410848f554 (patch) | |
tree | b0d93650a29342d98a70312cc4331e03eabcf785 /host/include | |
parent | 005b19ccc4d6794ed3ac8c9164a965b3a771d7d6 (diff) | |
download | uhd-c936fed335eff0362514feb92ede25410848f554.tar.gz uhd-c936fed335eff0362514feb92ede25410848f554.tar.bz2 uhd-c936fed335eff0362514feb92ede25410848f554.zip |
logging: UHD_HERE() now also prints current function (gcc only)
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/utils/log.hpp | 5 |
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) \ |