mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:25:07 -05:00
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:
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|||||||
Reference in New Issue
Block a user