Minor changes for the new log options.

This commit is contained in:
Andrea Mazzoleni 2014-02-16 20:49:16 +01:00
parent cb0a280ddc
commit 10d305285c
3 changed files with 3 additions and 5 deletions

2
TODO
View file

@ -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.

View file

@ -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

View file

@ -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);