Skip to content

Commit fa4c69e

Browse files
authored
Merge pull request rsyslog#5586 from rgerhards/queue-missing-warnings
queue: emit better warning messages on queue param mismatch
2 parents 7b78ff4 + 525a6f1 commit fa4c69e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

runtime/queue.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3296,6 +3296,13 @@ qqueueCorrectParams(qqueue_t *pThis)
32963296
if(pThis->iHighWtrMrk == 0) { /* guard against very low max queue sizes! */
32973297
pThis->iHighWtrMrk = pThis->iMaxQueueSize;
32983298
}
3299+
LogMsg(0, RS_RET_CONF_PARSE_WARNING, LOG_WARNING,
3300+
"queue \"%s\": queue.highWaterMark "
3301+
"is set below queue size. It has been automatically been "
3302+
"adjusted to %d. In any case, we strongly recommend to review the "
3303+
"queue definition and resolve inconsistencies to guarantee "
3304+
"the config really matches your intent.",
3305+
obj.GetName((obj_t*) pThis), pThis->iHighWtrMrk);
32993306
}
33003307
if( pThis->iLowWtrMrk < 2
33013308
|| pThis->iLowWtrMrk > pThis->iMaxQueueSize
@@ -3304,6 +3311,13 @@ qqueueCorrectParams(qqueue_t *pThis)
33043311
if(pThis->iLowWtrMrk == 0) {
33053312
pThis->iLowWtrMrk = 1;
33063313
}
3314+
LogMsg(0, RS_RET_CONF_PARSE_WARNING, LOG_WARNING,
3315+
"queue \"%s\": queue.lowWaterMark "
3316+
"is set below queue size or highWaterMark. It has been automatically been "
3317+
"adjusted to %d. In any case, we strongly recommend to review the "
3318+
"queue definition and resolve inconsistencies to guarantee "
3319+
"the config really matches your intent.",
3320+
obj.GetName((obj_t*) pThis), pThis->iHighWtrMrk);
33073321
}
33083322

33093323
if((pThis->iMinMsgsPerWrkr < 1

0 commit comments

Comments
 (0)