static const char *config_keys[] = {"LogLevel", "File", "Timestamp",
"PrintSeverity"};
static const char *config_keys[] = {"LogLevel", "File", "Timestamp",
"PrintSeverity"};
static void logfile_print(const char *msg, int severity,
cdtime_t timestamp_time) {
FILE *fh;
static void logfile_print(const char *msg, int severity,
cdtime_t timestamp_time) {
FILE *fh;
fprintf(stderr, "logfile plugin: fopen (%s) failed: %s\n", log_file,
fprintf(stderr, "logfile plugin: fopen (%s) failed: %s\n", log_file,
} else {
if (print_timestamp)
fprintf(fh, "[%s] %s%s\n", timestamp_str, level_str, msg);
} else {
if (print_timestamp)
fprintf(fh, "[%s] %s%s\n", timestamp_str, level_str, msg);
buf_ptr, buf_len, "Notification: severity = %s",
(n->severity == NOTIF_FAILURE)
? "FAILURE"
buf_ptr, buf_len, "Notification: severity = %s",
(n->severity == NOTIF_FAILURE)
? "FAILURE"
#define APPEND(bufptr, buflen, key, value) \
if ((buflen > 0) && (strlen(value) > 0)) { \
#define APPEND(bufptr, buflen, key, value) \
if ((buflen > 0) && (strlen(value) > 0)) { \
- status = ssnprintf(bufptr, buflen, ", %s = %s", key, value); \
+ status = snprintf(bufptr, buflen, ", %s = %s", key, value); \