src/ucx/logging.c

branch
webdav
changeset 260
4779a6fb4fbe
parent 254
4784c14aa639
--- a/src/ucx/logging.c	Tue Aug 25 12:07:56 2020 +0200
+++ b/src/ucx/logging.c	Sat Oct 24 17:34:32 2020 +0200
@@ -91,6 +91,10 @@
             k += strftime(msg+k, 128, logger->dateformat, localtime(&now));
         }
         if ((logger->mask & UCX_LOGGER_SOURCE) > 0) {
+            char *fpart = strrchr(file, '/');
+            if (fpart) file = fpart+1;
+            fpart = strrchr(file, '\\');
+            if (fpart) file = fpart+1;
             n = strlen(file);
             memcpy(msg+k, file, n);
             k += n;

mercurial