ucx/logging.c

changeset 162
18892c0a9adc
parent 157
0b33b9396851
--- a/ucx/logging.c	Sat Dec 05 10:34:10 2020 +0100
+++ b/ucx/logging.c	Sat Dec 05 11:54:58 2020 +0100
@@ -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