[Libreoffice-commits] core.git: Branch 'feature/cib_contract57b' - sal/osl
Thorsten Behrens
Thorsten.Behrens at CIB.de
Mon Jun 4 11:42:13 UTC 2018
sal/osl/all/log.cxx | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
New commits:
commit 1619d92d5eb11156032fbd7c31bcfb87e8a287e2
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date: Mon Jun 4 13:41:22 2018 +0200
sal: fix logfile path retrieval from logging.ini
Change-Id: I39803413533ae5b291d2e1abf4aa1bfe1f5900b5
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 4d60536f71dd..b231b94591bf 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -156,14 +156,19 @@ char const * getLogLevel() {
std::ofstream * getLogFile() {
// First check the environment variable, then the setting in logging.ini
static char const * logFile = getEnvironmentVariable("SAL_LOG_FILE");
- if (!logFile)
- return nullptr;
+ if (!logFile)
+ {
#ifdef WNT
- static char logFilePath[INI_STRINGBUF_SIZE];
- if (getValueFromLoggingIniFile("LogFilePath", logFilePath))
- logFile = logFilePath;
+ static char logFilePath[INI_STRINGBUF_SIZE];
+ if (getValueFromLoggingIniFile("LogFilePath", logFilePath))
+ logFile = logFilePath;
+ else
+ return nullptr;
+#else
+ return nullptr;
#endif
+ }
// stays until process exits
static std::ofstream file(logFile, std::ios::app | std::ios::out);
More information about the Libreoffice-commits
mailing list