# HG changeset patch # User Olaf Wintermann # Date 1689792430 -7200 # Node ID cd1c869720e05e20061a87d515bc832c1d01ff0b # Parent a0e02b70dad18d19f62c572644708a43bf30f567 remove loglevel parameter from log_printf diff -r a0e02b70dad1 -r cd1c869720e0 dav/sync.c --- a/dav/sync.c Wed Jul 19 20:39:09 2023 +0200 +++ b/dav/sync.c Wed Jul 19 20:47:10 2023 +0200 @@ -91,22 +91,18 @@ }; static size_t numdefprops = 8 ; -void log_printf(const char *loglevel, const char *fmt, ...) { - const char *sp = " "; - if(!loglevel) { - loglevel = ""; - sp = ""; - } - +void log_printf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); cxmutstr str = cx_vasprintf(fmt, ap); + + printf("%s", str.ptr); + if(synclog) { + fprintf(synclog, "%s", str.ptr); + } + free(str.ptr); + va_end(ap); - - printf("%s\n", str.ptr); - if(synclog) { - fprintf(synclog, "%s%s%s\n", loglevel, sp, str.ptr); - } } /* diff -r a0e02b70dad1 -r cd1c869720e0 dav/sync.h --- a/dav/sync.h Wed Jul 19 20:39:09 2023 +0200 +++ b/dav/sync.h Wed Jul 19 20:47:10 2023 +0200 @@ -105,7 +105,7 @@ int cmd_push(CmdArgs *args, DavBool outgoing, DavBool archive); int cmd_restore(CmdArgs *args); -void log_printf(const char *loglevel, const char *fmt, ...); +void log_printf(const char *fmt, ...); void print_outgoing( CmdArgs *args,