[Libreoffice-commits] .: sal/Library_sal.mk sal/osl

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Jan 29 12:37:29 PST 2013


 sal/Library_sal.mk  |    1 +
 sal/osl/all/log.cxx |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit fc480bcafd589b7fb32067a016d37213c80ad39a
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Jan 29 22:36:31 2013 +0200

    Strip SRCDIR from the logging output
    
    Change-Id: I6069102f6b9df72a63a840758158f672fdd6c621

diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index 5160382..533fb6c 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 13bd7c0..c084bdd 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)


More information about the Libreoffice-commits mailing list