ns_g_username = isc_commandline_argument;
break;
case 'v':
- printf("%s %s", ns_g_product, ns_g_version);
- if (*ns_g_description != 0)
- printf(" %s", ns_g_description);
- printf("\n");
+ printf("%s %s%s%s <id:%s>\n",
+ ns_g_product, ns_g_version,
+ (*ns_g_description != '\0') ? " " : "",
+ ns_g_description, ns_g_srcid);
exit(0);
case 'V':
- printf("%s %s", ns_g_product, ns_g_version);
- if (*ns_g_description != 0)
- printf(" %s", ns_g_description);
- printf(" <id:%s> built by %s with %s\n", ns_g_srcid,
+ printf("%s %s%s%s <id:%s>\n", ns_g_product, ns_g_version,
+ (*ns_g_description != '\0') ? " " : "",
+ ns_g_description, ns_g_srcid);
+ printf("built by %s with %s\n",
ns_g_builder, ns_g_configargs);
#ifdef __clang__
printf("compiled by CLANG %s\n", __VERSION__);
LIBXML_DOTTED_VERSION);
printf("linked to libxml2 version: %s\n",
xmlParserVersion);
+#endif
+#ifdef HAVE_JSON
+ printf("compiled with libjson-c version: %s\n",
+ JSON_C_VERSION);
+ printf("linked to libjson-c version: %s\n",
+ json_c_version());
#endif
exit(0);
case 'x':
isc_result_totext(result));
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
- ISC_LOG_NOTICE, "starting %s %s%s", ns_g_product,
- ns_g_version, saved_command_line);
+ ISC_LOG_NOTICE, "starting %s %s%s%s <id:%s>",
+ ns_g_product, ns_g_version,
+ *ns_g_description ? " " : "", ns_g_description,
+ ns_g_srcid);
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
ISC_LOG_NOTICE, "built with %s", ns_g_configargs);
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
+ ISC_LOG_NOTICE, "running as: %s%s",
+ program_name, saved_command_line);
+
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN,
ISC_LOG_NOTICE,
"----------------------------------------------------");
isc_time_formathttptimestamp(&ns_g_configtime, configtime,
sizeof(configtime));
- snprintf(line, sizeof(line), "version: %s%s%s%s <id:%s>\n",
- ns_g_version, ob, alt, cb, ns_g_srcid);
+ snprintf(line, sizeof(line), "version: %s %s%s%s <id:%s>%s%s%s\n",
+ ns_g_product, ns_g_version,
+ (*ns_g_description != '\0') ? " " : "",
+ ns_g_description, ns_g_srcid, ob, alt, cb);
CHECK(putstr(text, line));
snprintf(line, sizeof(line), "boot time: %s\n", boottime);