Write verbose messages to the syslog in the kafs-preload programme and also
set the name of the facility.
Signed-off-by: David Howells <dhowells@redhat.com>
va_list va;
va_start(va, fmt);
+ if (isatty(2)) {
+ vprintf(fmt, va);
+ putchar('\n');
+ } else {
+ vsyslog(LOG_INFO, fmt, va);
+ }
vprintf(fmt, va);
putchar('\n');
va_end(va);
}
}
+ if (!redirect_to_stdout) {
+ openlog("kafs-preload", 0, LOG_USER);
+ syslog(LOG_NOTICE, "kAFS: Preloading cell database");
+ }
+
argc -= optind;
argv += optind;