- time_t tt = CDTIME_T_TO_TIME_T(timestamp_time);
- localtime_r(&tt, ×tamp_tm);
+ struct tm timestamp_tm;
+ localtime_r(&CDTIME_T_TO_TIME_T(timestamp_time), ×tamp_tm);
strftime(timestamp_str, sizeof(timestamp_str), "%Y-%m-%d %H:%M:%S",
×tamp_tm);
strftime(timestamp_str, sizeof(timestamp_str), "%Y-%m-%d %H:%M:%S",
×tamp_tm);
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); \
plugin_register_notification("logfile", logfile_notification,
/* user_data = */ NULL);
} /* void module_register (void) */
plugin_register_notification("logfile", logfile_notification,
/* user_data = */ NULL);
} /* void module_register (void) */