From 10d305285cf5c856ca0e16b75cf37e660462cb0e Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 16 Feb 2014 20:49:16 +0100 Subject: [PATCH] Minor changes for the new log options. --- TODO | 2 -- snapraid.1 | 4 ++-- state.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 29d367c2..d3d78077 100644 --- a/TODO +++ b/TODO @@ -5,8 +5,6 @@ This is the list of TODO items for SnapRAID. - Next -* Open log files in APPEND mode and put a timestamp inside. - * Don't disable default 10d/12% if -p or -o is specified. But check that -p0 still work. diff --git a/snapraid.1 b/snapraid.1 index 3014a640..04cc0bbd 100644 --- a/snapraid.1 +++ b/snapraid.1 @@ -820,8 +820,8 @@ and you\(cqll get only a summary at the end of the operations. When checking and fixing this allows to keep separated the possible huge list of errors from the human readable output. -If the specified FILE path start with \(cq>>\(cq the file is opened -in append mode. Inside the path, occurrences of %D and %T are +If the specified path starts with \(cq>>\(cq the file is opened +in append mode. Occurrences of %D and %T in the name are replaced with the date and time in the format YYYYMMDD and HHMMSS. .TP diff --git a/state.c b/state.c index 5587310a..a8751f35 100644 --- a/state.c +++ b/state.c @@ -366,7 +366,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co fprintf(stdlog, "unixtime:%"PRIi64"\n", (int64_t)t); if (tm) { char datetime[64]; - strftime(datetime, sizeof(datetime), "%F %T", tm); + strftime(datetime, sizeof(datetime), "%Y-%m-%d %H:%M:%S", tm); fprintf(stdlog, "time:%s\n", datetime); } fprintf(stdlog, "conf:%s\n", path);