From 71a62e4bba1028be777bcec2729ac8ebc02141de Mon Sep 17 00:00:00 2001 From: Stijn Jonker Date: Fri, 28 Feb 2020 20:24:43 +0100 Subject: [PATCH 1/2] Add --silent option to supress non essential logging --- ubxtool.cc | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/ubxtool.cc b/ubxtool.cc index a1d69cb..a34c337 100644 --- a/ubxtool.cc +++ b/ubxtool.cc @@ -41,6 +41,7 @@ static char program[]="ubxtool"; bool doDEBUG{false}; bool doLOGFILE{false}; bool doVERSION{false}; +bool doSILENT{false}; struct timespec g_gnssutc; uint16_t g_galwn; @@ -239,7 +240,7 @@ UBXMessage sendAndWaitForUBX(int fd, int seconds, basic_string_view msg catch(...) { if(n==1) throw; - cerr<<"Retransmit"< ms catch(...) { if(n==1) throw; - cerr<<"Retransmit"< 30) { - cerr<(s)<<","<(s)<<"@"<(s)<<" "; + if (!doSILENT) { + cerr<(s)<<","<(s)<<"@"<(s)<<" "; + } + cerr< Date: Fri, 28 Feb 2020 20:29:50 +0100 Subject: [PATCH 2/2] Consider "Entering main loop" an essential log line. --- ubxtool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubxtool.cc b/ubxtool.cc index a34c337..8620ef3 100644 --- a/ubxtool.cc +++ b/ubxtool.cc @@ -1046,7 +1046,7 @@ int main(int argc, char** argv) int curCycleTOW{-1}; // means invalid ns.launch(); - if (!doSILENT) { cerr<