mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 02:55:06 -05:00
Add support for debug messages
Add new DEBUG_LOG macro for debug messages. The messages are enabled when compiled with --enable-debug and they are printed when the -d option is used twice.
This commit is contained in:
6
main.c
6
main.c
@@ -326,7 +326,7 @@ int main
|
||||
} else if (!strcmp("-n", *argv)) {
|
||||
nofork = 1;
|
||||
} else if (!strcmp("-d", *argv)) {
|
||||
debug = 1;
|
||||
debug++;
|
||||
nofork = 1;
|
||||
} else if (!strcmp("-4", *argv)) {
|
||||
address_family = IPADDR_INET4;
|
||||
@@ -352,6 +352,10 @@ int main
|
||||
LOG_OpenSystemLog();
|
||||
}
|
||||
|
||||
if (debug > 1) {
|
||||
LOG_EnableDebug();
|
||||
}
|
||||
|
||||
LOG(LOGS_INFO, LOGF_Main, "chronyd version %s starting", CHRONY_VERSION);
|
||||
|
||||
DNS_SetAddressFamily(address_family);
|
||||
|
||||
Reference in New Issue
Block a user