diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-01-29 22:36:31 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-01-29 22:37:02 +0200 |
commit | fc480bcafd589b7fb32067a016d37213c80ad39a (patch) | |
tree | cb183b6ac7682662ba283a2f1be622dc5de7b29f /sal | |
parent | a2b651825926fd6d84073419d03a9808e284b48d (diff) |
Strip SRCDIR from the logging output
Change-Id: I6069102f6b9df72a63a840758158f672fdd6c621
Diffstat (limited to 'sal')
-rw-r--r-- | sal/Library_sal.mk | 1 | ||||
-rw-r--r-- | sal/osl/all/log.cxx | 8 |
2 files changed, 7 insertions, 2 deletions
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) |