You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2004/09/22 21:47:51 UTC
cvs commit: httpd-2.0/server log.c
jorton 2004/09/22 12:47:51
Modified: server log.c
Log:
* server/log.c (log_error_core): For APLOG_DEBUG on Unix, if __FILE__
is an absolute path (as in a VPATH build), just log the basename.
Revision Changes Path
1.150 +8 -1 httpd-2.0/server/log.c
Index: log.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/log.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -d -w -u -r1.149 -r1.150
--- log.c 14 Aug 2004 10:49:43 -0000 1.149
+++ log.c 22 Sep 2004 19:47:51 -0000 1.150
@@ -459,7 +459,14 @@
}
file = tmp;
}
-#endif /*_OSD_POSIX*/
+#else /* _OSD_POSIX || WIN32 */
+ const char *p;
+ /* On Unix, __FILE__ may be an absolute path in a
+ * VPATH build. */
+ if (file[0] == '/' && (p = ap_strrchr_c(file, '/')) != NULL) {
+ file = p + 1;
+ }
+#endif /*_OSD_POSIX || WIN32 */
len += apr_snprintf(errstr + len, MAX_STRING_LEN - len,
"%s(%d): ", file, line);
}