Adjust Hamlib trace verbosity levels

Release  builds were  incrorrectly selecting  a high  level of  Hamlib
trace verbosity.

Added a  new CMake option  to turn  on maximum Hamlib  trace verbosity
when  required (WSJT_HAMLIB_VERBOSE_TRACE  default=OFF).  The  current
WSJT_HAMLIB_TRACE (default=OFF)  now only turns on  tracing at warning
level   and  above,   this  option   must   be  set   ON  before   the
WSJT_HAMLIB_VERBOSE_TRACE    option   becomes    available.    Release
configuration builds  use a Hamlib  trace level  of error or  above by
default.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5261 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2015-04-21 15:38:52 +00:00
parent 3fa68143c2
commit c00a39bee4
3 changed files with 18 additions and 8 deletions
+14 -6
View File
@@ -131,11 +131,15 @@ void HamlibTransceiver::register_transceivers (TransceiverFactory::Transceivers
rig_set_debug_callback (debug_callback, nullptr);
#if WSJT_HAMLIB_TRACE
#if WSJT_HAMLIB_VERBOSE_TRACE
rig_set_debug (RIG_DEBUG_TRACE);
#else
rig_set_debug (RIG_DEBUG_VERBOSE);
#endif
#elif defined (NDEBUG)
rig_set_debug (RIG_DEBUG_ERR);
#else
rig_set_debug (RIG_DEBUG_VERBOSE);
rig_set_debug (RIG_DEBUG_WARN);
#endif
rig_load_all_backends ();
@@ -703,7 +707,7 @@ void HamlibTransceiver::poll ()
#if defined (NDEBUG)
rig_set_debug (RIG_DEBUG_ERR);
#else
rig_set_debug (RIG_DEBUG_VERBOSE);
rig_set_debug (RIG_DEBUG_WARN);
#endif
#endif
@@ -832,11 +836,15 @@ void HamlibTransceiver::poll ()
#if !WSJT_TRACE_CAT_POLLS
#if WSJT_HAMLIB_TRACE
rig_set_debug (RIG_DEBUG_TRACE);
#elif defined (NDEBUG)
rig_set_debug (RIG_DEBUG_ERR);
#if WSJT_HAMLIB_VERBOSE_TRACE
rig_set_debug (RIG_DEBUG_TRACE);
#else
rig_set_debug (RIG_DEBUG_VERBOSE);
rig_set_debug (RIG_DEBUG_VERBOSE);
#endif
#elif defined (NDEBUG)
rig_set_debug (RIG_DEBUG_ERR);
#else
rig_set_debug (RIG_DEBUG_WARN);
#endif
#endif
}