summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-06-11 07:47:53 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-06-12 09:50:03 +0200
commit42aac9ef70d459dc85cb77333a08a4c9ab52955c (patch)
treebee0afe03127c9a009a8b8652082f78a7897881e /desktop
parentc2b1ff4ab1ed7c4a6455401fd1ef6ddaf908538f (diff)
better updater logging
Change-Id: I6012f2159d058cbb2afb4b685badb8c870adf07b Reviewed-on: https://gerrit.libreoffice.org/38679 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/updater.cxx14
-rw-r--r--desktop/source/app/updater.hxx1
2 files changed, 15 insertions, 0 deletions
diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index d6b5574bd2ba..1dac58923a3c 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -144,17 +144,20 @@ char** createCommandLine()
OUString aPatchDir = Updater::getPatchDirURL();
rtl::Bootstrap::expandMacros(aPatchDir);
OUString aTempDirPath = getPathFromURL(aPatchDir);
+ Updater::log("Patch Dir: " + aTempDirPath);
createStr(aTempDirPath, pArgs, 1);
}
{
// the actual update directory
OUString aInstallPath = getPathFromURL(aLibExecDirURL);
+ Updater::log("Install Dir: " + aInstallPath);
createStr(aInstallPath, pArgs, 2);
}
{
// the temporary updated build
OUString aUpdateDirURL = Updater::getUpdateDirURL();
OUString aWorkingDir = getPathFromURL(aUpdateDirURL);
+ Updater::log("Working Dir: " + aWorkingDir);
createStr(aWorkingDir, pArgs, 3);
}
{
@@ -164,6 +167,7 @@ char** createCommandLine()
{
OUString aExeDir = Updater::getExecutableDirURL();
OUString aSofficePath = getPathFromURL(aExeDir);
+ Updater::log("soffice Path: " + aSofficePath);
createStr(aSofficePath, pArgs, 5);
}
{
@@ -215,8 +219,10 @@ void update()
OUString aTempDirPath = getPathFromURL(aTempDirURL);
OString aPath = OUStringToOString(aTempDirPath + "/" + OUString::fromUtf8(pUpdaterName), RTL_TEXTENCODING_UTF8);
+ Updater::log("Calling the updater with parameters: ");
char** pArgs = createCommandLine();
+
#if UNX
if (execv(aPath.getStr(), pArgs))
{
@@ -730,4 +736,12 @@ void Updater::log(const OString& rMessage)
aLog.WriteLine(rMessage);
}
+void Updater::log(const char* pMessage)
+{
+ OUString aUpdateLog = getUpdateInfoLog();
+ SvFileStream aLog(aUpdateLog, StreamMode::STD_READWRITE);
+ aLog.Seek(aLog.Tell() + aLog.remainingSize()); // make sure we are at the end
+ aLog.WriteCharPtr(pMessage);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/updater.hxx b/desktop/source/app/updater.hxx
index f3f28bc638ec..922d5264ec5e 100644
--- a/desktop/source/app/updater.hxx
+++ b/desktop/source/app/updater.hxx
@@ -30,6 +30,7 @@ public:
static void log(const OUString& rMessage);
static void log(const OString& rMessage);
+ static void log(const char* pMessage);
};
#endif