client: add -d option to print debug messages

This commit is contained in:
Miroslav Lichvar 2015-08-18 13:04:09 +02:00
parent 28b0a23949
commit 22345c5ddf
4 changed files with 11 additions and 3 deletions

View file

@ -3265,6 +3265,9 @@ This defaults to the compiled-in default; there would rarely be a need
to change this.
@item -n
This option disables resolving IP addresses to hostnames.
@item -d
This option enables printing of debugging messages (if compiled with debugging
support).
@item -4
With this option hostnames will be resolved only to IPv4 addresses.
@item -6

View file

@ -32,6 +32,9 @@ specify port-number
\fB\-n\fR
display raw IP addresses (don't attempt to look up hostnames)
.TP
\fB\-d\fR
print debugging messages (if compiled with debugging support)
.TP
\fB\-4\fR
resolve hostnames only to IPv4 addresses
.TP

View file

@ -2797,6 +2797,8 @@ main(int argc, char **argv)
}
} else if (!strcmp(*argv, "-a")) {
auto_auth = 1;
} else if (!strcmp(*argv, "-d")) {
log_debug_enabled = 1;
} else if (!strcmp(*argv, "-m")) {
multi = 1;
} else if (!strcmp(*argv, "-n")) {
@ -2810,7 +2812,7 @@ main(int argc, char **argv)
return 0;
} else if (!strncmp(*argv, "-", 1)) {
LOG(LOGS_ERR, LOGF_Client,
"Usage: %s [-h HOST] [-p PORT] [-n] [-4|-6] [-a] [-f FILE] [-m] [COMMAND]",
"Usage: %s [-h HOST] [-p PORT] [-n] [-d] [-4|-6] [-a] [-f FILE] [-m] [COMMAND]",
progname);
return 1;
} else {

4
configure vendored
View file

@ -768,9 +768,9 @@ add_def DEFAULT_CONF_FILE "\"$SYSCONFDIR/chrony.conf\""
add_def DEFAULT_USER "\"$default_user\""
add_def MAIL_PROGRAM "\"$mail_program\""
common_features="`get_features ASYNCDNS IPV6 SECHASH`"
common_features="`get_features ASYNCDNS IPV6 SECHASH DEBUG`"
chronyc_features="`get_features READLINE`"
chronyd_features="`get_features CMDMON NTP REFCLOCK RTC PRIVDROP DEBUG`"
chronyd_features="`get_features CMDMON NTP REFCLOCK RTC PRIVDROP`"
add_def CHRONYC_FEATURES "\"$chronyc_features $common_features\""
add_def CHRONYD_FEATURES "\"$chronyd_features $common_features\""
echo "Features : $chronyd_features $chronyc_features $common_features"