Connect RTKLIB trace to Glog verbose logging system

A given logging level can now be activated with the flag --v=level
This commit is contained in:
Carles Fernandez 2017-05-10 10:58:35 +02:00
parent 25bb7ae54d
commit facd63f423
2 changed files with 9 additions and 8 deletions

View File

@ -3142,14 +3142,15 @@ void traceobs(int level __attribute__((unused)), const obsd_t *obs __attribute__
//void traceopen(const char *file) {}
//void traceclose(void) {}
//void tracelevel(int level) {}
void trace (int level __attribute__((unused)), const char *format __attribute__((unused)), ...)
void trace (int level, const char *format, ...)
{
/*va_list ap;*/
/* print error message to stderr */
/*printf("RTKLIB TRACE[%i]:",level);
va_start(ap,format);
vfprintf(stdout,format,ap);
va_end(ap);*/
va_list ap;
char buffer[256];
va_start(ap, format);
vsprintf(buffer, format, ap);
va_end(ap);
std::string str(buffer);
VLOG(level) << "RTKLIB TRACE[" << level << "]:" << str;
}
//void tracet (int level, const char *format, ...) {}
//void tracemat(int level, const double *A, int n, int m, int p, int q) {}

View File

@ -79,7 +79,7 @@
#define GNSS_SDR_RTKLIB_RTKCMN_H_
#include "rtklib.h"
#include <glog/logging.h>
/* coordinate rotation matrix ------------------------------------------------*/
#define Rx(t,X) do { \