Previously, the default output from the libdns library went to stderr by
default. This was inconsistent with the rest of the output. This commit
changes the default logging to go to stdout, with notable exception - when the
output of the signing process goes to stdout, the messages are printed to the
stderr. This is consistent with other functions that output information about
the signing process - e.g. print_stats().
static void
report(const char *format, ...) {
+ FILE *out = output_stdout ? stderr : stdout;
va_list args;
va_start(args, format);
- vfprintf(stderr, format, args);
+ vfprintf(out, format, args);
va_end(args);
- putc('\n', stderr);
+ putc('\n', out);
}
static void