This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] cygserver: Only print basename of source in debug output to raise readability
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 24 Mar 2017 17:04:09 -0000
- Subject: [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);