This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] cygserver: Only print basename of source in debug output to raise readability


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=838eaf6674b1350888b9803290fbf17628ac32ec

commit 838eaf6674b1350888b9803290fbf17628ac32ec
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Fri Mar 24 16:12:52 2017 +0100

    cygserver: Only print basename of source in debug output to raise readability
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygserver/bsd_log.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/winsup/cygserver/bsd_log.cc b/winsup/cygserver/bsd_log.cc
index 2ab3526..7c6dcb6 100644
--- a/winsup/cygserver/bsd_log.cc
+++ b/winsup/cygserver/bsd_log.cc
@@ -63,7 +63,8 @@ _vlog (const char *file, int line, int level,
     return;
   pos = stpcpy (buf, "cygserver: ");
   if (file && log_debug == TUN_TRUE)
-    pos += snprintf (pos, 16384 - (pos - buf), "%s, line %d: ", file, line);
+    pos += snprintf (pos, 16384 - (pos - buf), "%s, line %d: ",
+		     basename ((char *) file), line);
   vsnprintf (pos, 16384 - (pos - buf), fmt, ap);
   if (log_syslog == TUN_TRUE && level != LOG_DEBUG)
     syslog (level, buf);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]