X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fcommon%2Fsrc%2Flogging.c;h=56457f7b530be291d5bf7419bcdcc3cedcb45d2c;hb=fd4477a9698a46ce5755d614b663c18ceadf43c4;hp=65fb7458ae3311a54e7e742dde3cc467195f278e;hpb=9c923bcc9322c22220b574671c7b46f10008c614;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/common/src/logging.c b/src/rmr/common/src/logging.c index 65fb745..56457f7 100644 --- a/src/rmr/common/src/logging.c +++ b/src/rmr/common/src/logging.c @@ -101,8 +101,8 @@ extern int rmr_vlog_init( ) { if( (data = getenv( ENV_LOG_VLEVEL )) != NULL ) { log_vlevel = atoi( data ); - if( log_vlevel < 0 ) { - log_vlevel = 0; + if( log_vlevel < -1 ) { // allow housekeeping stats to be squelched with -1 + log_vlevel = -1; } else { if( log_vlevel > RMR_VL_DEBUG ) { log_vlevel = RMR_VL_DEBUG; @@ -156,6 +156,8 @@ extern void rmr_vlog( int write_level, char* fmt, ... ) { vsnprintf( body, sizeof( msg ) - (hlen+2), fmt, argp ); // add in user message formatting it along the way fprintf( stderr, "%s", msg ); // we grew from printfs so all existing msg have \n; assume there + + va_end( argp ); } /* @@ -190,6 +192,8 @@ extern void rmr_vlog_force( int write_level, char* fmt, ... ) { vsnprintf( body, sizeof( msg ) - (hlen+2), fmt, argp ); // add in user message formatting it along the way fprintf( stderr, "%s", msg ); // we grew from printfs so all existing msg have \n; assume there + + va_end( argp ); } // -------------------- public functions that are needed -----------------