log.c (02.09.09)
exFAT file system implementation library.
- Copyright (C) 2009, 2010 Andrew Nayenko
+ Copyright (C) 2010-2012 Andrew Nayenko
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "exfat.h"
#include <stdarg.h>
#include <syslog.h>
+#include <unistd.h>
int exfat_errors;
va_end(ap);
fputs(".\n", stderr);
- vsyslog(LOG_CRIT, format, aq);
+ if (!isatty(STDERR_FILENO))
+ vsyslog(LOG_CRIT, format, aq);
va_end(aq);
abort();
va_end(ap);
fputs(".\n", stderr);
- vsyslog(LOG_ERR, format, aq);
+ if (!isatty(STDERR_FILENO))
+ vsyslog(LOG_ERR, format, aq);
va_end(aq);
}
va_end(ap);
fputs(".\n", stderr);
- vsyslog(LOG_WARNING, format, aq);
+ if (!isatty(STDERR_FILENO))
+ vsyslog(LOG_WARNING, format, aq);
va_end(aq);
}