logging: disable all debug messages in non-debug build
For consistency, don't print debug messages that are compiled in due to using the LOG macro instead of DEBUG_LOG.
This commit is contained in:
parent
07badbede7
commit
c7223f4c8f
2 changed files with 4 additions and 1 deletions
2
client.c
2
client.c
|
@ -3208,7 +3208,9 @@ main(int argc, char **argv)
|
||||||
csv_mode = 1;
|
csv_mode = 1;
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
|
#if DEBUG > 0
|
||||||
log_min_severity = LOGS_DEBUG;
|
log_min_severity = LOGS_DEBUG;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
hostnames = optarg;
|
hostnames = optarg;
|
||||||
|
|
|
@ -214,7 +214,8 @@ LOG_OpenSystemLog(void)
|
||||||
|
|
||||||
void LOG_SetMinSeverity(LOG_Severity severity)
|
void LOG_SetMinSeverity(LOG_Severity severity)
|
||||||
{
|
{
|
||||||
log_min_severity = CLAMP(LOGS_DEBUG, severity, LOGS_FATAL);
|
/* Don't print any debug messages in a non-debug build */
|
||||||
|
log_min_severity = CLAMP(DEBUG > 0 ? LOGS_DEBUG : LOGS_INFO, severity, LOGS_FATAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|
Loading…
Reference in a new issue