diff -r 36a7f2ea7d12 -r 592ff4ca2aaa dav/sync.c --- a/dav/sync.c Thu Jul 20 21:55:45 2023 +0200 +++ b/dav/sync.c Thu Jul 20 22:15:01 2023 +0200 @@ -72,6 +72,9 @@ static FILE *synclog; +static int orig_argc; +static char **orig_argv; + static void xmlerrorfnc(void * c, const char * msg, ... ) { va_list ap; va_start(ap, msg); @@ -141,6 +144,19 @@ if(!synclog) { fprintf(stderr, "Cannot open logfile %s: %s\n", lf_path, strerror(errno)); ret = 1; + } else { + time_t t = time(NULL); + char *now = ctime(&t); + size_t len = strlen(now); + if(now[len-1] == '\n') { + len--; + } + + fprintf(synclog, "[%.*s] ", (int)len, now); + for(int i=0;i