diff --git a/lib/log.c b/lib/log.c index b9c1867..b58070a 100644 --- a/lib/log.c +++ b/lib/log.c @@ -23,41 +23,14 @@ #include #include "config.h" -#ifdef HAVE_LIBHAMLIB -#include -#endif - static FILE *log_file; -#ifdef HAVE_LIBHAMLIB -/** - * The default setting for hamlib is logging to stderr. Adjust it to our log, - * or use /dev/null to redirect the hamlib log. - */ -static void set_hamlib_log() -{ - if (log_file) { - rig_set_debug_file(log_file); - - } else { - FILE *dev_null; - - dev_null = fopen("/dev/null", "w"); - if (dev_null) - rig_set_debug_file(dev_null); - } -} -#else -static inline void set_hamlib_log(FILE *) { } -#endif - int log_open(const char *file) { log_file = fopen(file, "a"); if (!log_file) return errno; - set_hamlib_log(); return 0; } @@ -85,8 +58,6 @@ int log_open_argv(int argc, char **argv) if (open && !filename) log_file = stderr; - set_hamlib_log(); - return 0; }