From fc480bcafd589b7fb32067a016d37213c80ad39a Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 29 Jan 2013 22:36:31 +0200 Subject: Strip SRCDIR from the logging output Change-Id: I6069102f6b9df72a63a840758158f672fdd6c621 --- sal/Library_sal.mk | 1 + sal/osl/all/log.cxx | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'sal') diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk index 5160382f8eb2..533fb6c2c777 100644 --- a/sal/Library_sal.mk +++ b/sal/Library_sal.mk @@ -52,6 +52,7 @@ $(eval $(call gb_Library_add_defs,sal,\ -DSAL_DLLIMPLEMENTATION \ -DRTL_OS="\"$(RTL_OS)"\" \ -DRTL_ARCH="\"$(RTL_ARCH)"\" \ + -DSRCDIR="\"$(SRCDIR)\"" \ )) $(eval $(call gb_Library_use_libraries,sal,\ diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx index 13bd7c0b987f..c084bddbe5af 100644 --- a/sal/osl/all/log.cxx +++ b/sal/osl/all/log.cxx @@ -217,8 +217,12 @@ void log( s << /*no where*/' ' << message << '\n'; } else { s << area << ':' << OSL_DETAIL_GETPID << ':' - << osl::Thread::getCurrentIdentifier() << ':' << where << message - << '\n'; + << osl::Thread::getCurrentIdentifier() << ':'; + if (strncmp(where, SRCDIR, sizeof(SRCDIR)-1) == 0) + s << where+sizeof(SRCDIR); + else + s << where; + s << message << '\n'; } #ifdef HAVE_SYSLOG_H if (sal_use_syslog) -- cgit