summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2017-01-16 05:04:20 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-05-08 23:55:33 +0200
commit4c5b4752786ae2c174cd8fa8aa42b27a0994f34a (patch)
treed5ce98f93f756a83e19aa92cb7f28e85423d4a12 /sal
parent59c1fa3f12ec79c97fd65e86b6d8df200edbe94b (diff)
sal: log windows trace output to debugger console
Change-Id: Ic8fea70fd3b0b2d4881cd30e3616f5bbf7c0c533 Reviewed-on: https://gerrit.libreoffice.org/53776 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/all/log.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index bebc8e5647ca..25662507ce18 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -22,6 +22,7 @@
#include <fstream>
#include <config_global.h>
+#include <config_options.h>
#include <osl/thread.hxx>
#include <rtl/string.h>
#include <sal/detail/log.h>
@@ -326,9 +327,16 @@ void sal_detail_log(
*logFile << s.str() << std::endl;
}
else {
+#ifdef WNT
+ // write to Windows debugger console, too
+ OutputDebugStringA(s.str().c_str());
+#endif
+#if ! (defined(WNT) && ENABLE_RELEASE_BUILD)
+ // on Windows deployments, no one reads console output
s << '\n';
std::fputs(s.str().c_str(), stderr);
std::fflush(stderr);
+#endif
}
}
#endif