@@ -115,8 +115,8 @@ static const char *TLSUV_MODULE = "tlsuv";
115
115
116
116
static model_map log_levels ;
117
117
static int ziti_log_lvl = ZITI_LOG_DEFAULT_LEVEL ;
118
- static int ziti_log_repeat_limit = -1 ;
119
- static uint32_t ziti_log_repeat_notify_count = 500 ;
118
+ static int ziti_log_suppress_threshold = -1 ;
119
+ static uint32_t ziti_log_suppress_notify_count = 500 ;
120
120
static FILE * ziti_debug_out ;
121
121
static bool log_initialized = false;
122
122
static uv_pid_t log_pid = 0 ;
@@ -244,12 +244,12 @@ void ziti_log_set_logger(log_writer log) {
244
244
logger = log ;
245
245
}
246
246
247
- void ziti_log_set_repeat_limit (int32_t n ) {
248
- ziti_log_repeat_limit = n ;
247
+ void ziti_log_set_suppress_threshold (int32_t n ) {
248
+ ziti_log_suppress_threshold = n ;
249
249
}
250
250
251
- void ziti_log_set_repeat_notify_count (uint32_t n ) {
252
- ziti_log_repeat_notify_count = n ;
251
+ void ziti_log_set_suppress_notify_count (uint32_t n ) {
252
+ ziti_log_suppress_notify_count = n ;
253
253
}
254
254
255
255
static void init_uv_mbed_log () {
@@ -395,21 +395,21 @@ void ziti_logger(int level, const char *module, const char *file, unsigned int l
395
395
len = (int ) loglinelen ;
396
396
}
397
397
398
- if (ziti_log_repeat_limit > 0 ) {
398
+ if (ziti_log_suppress_threshold > 0 ) {
399
399
if (strcmp (logbuf -> mesg , logbuf -> prev_mesg ) == 0 ) {
400
400
logbuf -> repeat ++ ;
401
- if (logbuf -> repeat >= ziti_log_repeat_limit ) {
401
+ if (logbuf -> repeat >= ziti_log_suppress_threshold ) {
402
402
if (logbuf -> repeat % 500 == 0 ) {
403
403
int l = strlen ("previous message repeated 500 times" );
404
404
logfunc (level , "\b" , "previous message repeated 500 times" , l );
405
405
}
406
406
return ; // suppress
407
407
}
408
408
} else {
409
- if (logbuf -> repeat > ziti_log_repeat_limit ) {
409
+ if (logbuf -> repeat > ziti_log_suppress_threshold ) {
410
410
// previous message had been silenced
411
411
int l = snprintf (logbuf -> prev_mesg , loglinelen , "previous message repeated %u times" ,
412
- (logbuf -> repeat - ziti_log_repeat_limit + 1 ) % 500 );
412
+ (logbuf -> repeat - ziti_log_suppress_threshold + 1 ) % 500 );
413
413
logfunc (level , "\b" , logbuf -> prev_mesg , l );
414
414
}
415
415
logbuf -> repeat = 0 ;
0 commit comments