projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.6' into collectd-5.7
[collectd.git]
/
src
/
logfile.c
diff --git
a/src/logfile.c
b/src/logfile.c
index
e51c9db
..
db12291
100644
(file)
--- a/
src/logfile.c
+++ b/
src/logfile.c
@@
-80,7
+80,6
@@
static void logfile_print(const char *msg, int severity,
cdtime_t timestamp_time) {
FILE *fh;
_Bool do_close = 0;
cdtime_t timestamp_time) {
FILE *fh;
_Bool do_close = 0;
- struct tm timestamp_tm;
char timestamp_str[64];
char level_str[16] = "";
char timestamp_str[64];
char level_str[16] = "";
@@
-107,8
+106,8
@@
static void logfile_print(const char *msg, int severity,
}
if (print_timestamp) {
}
if (print_timestamp) {
-
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);