diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-02-23 23:04:38 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-02-23 23:04:38 +0100 |
commit | 4671571c93db7f083db21cfca526ac382cdfc7ad (patch) | |
tree | 834d24e1e59ab9ace06d15fd9abf149470ca20e3 /ble | |
parent | d0fb1850606ce003887259675e271a9aade4fda0 (diff) | |
download | ble-toys-4671571c93db7f083db21cfca526ac382cdfc7ad.tar.gz ble-toys-4671571c93db7f083db21cfca526ac382cdfc7ad.tar.bz2 ble-toys-4671571c93db7f083db21cfca526ac382cdfc7ad.tar.xz ble-toys-4671571c93db7f083db21cfca526ac382cdfc7ad.zip |
Major improvement in the sm-get-value utility:
o Adding command line option parsing through boost::program_option
Current options:
--device, --sensor
--format selects between CSV and JSON output.
--sleep controls single reads vs continuous reads.
o Adding JSON output.
o Adding support for Release builds without debugging info. Needs improvement.
Diffstat (limited to 'ble')
-rw-r--r-- | ble/log.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -3,6 +3,8 @@ #include <boost/log/core.hpp> #include <boost/log/trivial.hpp> + +#ifdef DEBUG #define D BOOST_LOG_TRIVIAL(debug) #define I BOOST_LOG_TRIVIAL(info) #define W BOOST_LOG_TRIVIAL(warning) @@ -10,5 +12,14 @@ #define DF BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ": " #define IF BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " #define WF BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << ": " +#else +#define D if (false) BOOST_LOG_TRIVIAL(debug) +#define I if (false) BOOST_LOG_TRIVIAL(info) +#define W if (false) BOOST_LOG_TRIVIAL(warning) + +#define DF if (false) BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ": " +#define IF if (false) BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": " +#define WF if (false) BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << ": " +#endif #endif |