From: E. Scott Daniels Date: Fri, 31 Jan 2020 21:10:34 +0000 (-0500) Subject: Ensure route table thread logging can be disabled X-Git-Tag: 3.1.2~1 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=05ce11d8c370a66c238b1db3fff1fde4790fa701;p=ric-plt%2Flib%2Frmr.git Ensure route table thread logging can be disabled The messages written by the route table collector thread are not affected by the verbose level that the user application can set. This change allows the complete squelching of the messages from this thread when all messages are turned off. Signed-off-by: E. Scott Daniels Change-Id: Iddea13591f28a96f0cfc4630924a9fc11fadd809 --- diff --git a/CHANGES b/CHANGES index cd88f3e..d40e1fc 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ API and build change and fix summaries. Doc correctsions and/or changes are not mentioned here; see the commit messages. +2020 January 31; verison 3.1.1 + Allow route table thread logging to be completely disabled + when logging is turned off. + 2020 January 26; verison 3.1.0 First step to allowing the user programme to control messages written to standard error. Introduces the rmr_set_vlevel() diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a51535..a93ce69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,7 @@ cmake_minimum_required( VERSION 3.5 ) set( major_version "3" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this set( minor_version "1" ) -set( patch_level "0" ) +set( patch_level "1" ) set( install_root "${CMAKE_INSTALL_PREFIX}" ) set( install_inc "include/rmr" ) diff --git a/src/rmr/common/src/logging.c b/src/rmr/common/src/logging.c index 0105391..ce6c246 100644 --- a/src/rmr/common/src/logging.c +++ b/src/rmr/common/src/logging.c @@ -171,6 +171,10 @@ extern void rmr_vlog_force( int write_level, char* fmt, ... ) { rmr_vlog_init(); } + if( log_vlevel <= 0 ) { // cant force if off completely to allow for total silience + return; + } + if( write_level > RMR_VL_DEBUG || write_level < 0 ) { write_level = RMR_VL_DEBUG; }