[PATCH 2 of 2] Extend logging to all choices and SW updates

Wald Commits scm-commit at wald.intevation.org
Thu Sep 11 12:06:23 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1410429959 -7200
# Node ID a12e6172d82ce3f3986000a79048d2eb4ca3e5a4
# Parent  edbf5e5e88f4cb2c5b18e54709a46cd9ba47efc4
Extend logging to all choices and SW updates.

diff -r edbf5e5e88f4 -r a12e6172d82c ui/installwrapper.cpp
--- a/ui/installwrapper.cpp	Thu Sep 11 12:05:24 2014 +0200
+++ b/ui/installwrapper.cpp	Thu Sep 11 12:05:59 2014 +0200
@@ -44,12 +44,13 @@
     }
 
     foreach (const QString &b64data, mChoices) {
-       if (choicesFile->write(b64data.toLatin1()) == -1) {
-           return false;
-       }
-       if (choicesFile->write("\n") == -1) {
-           return false;
-       }
+        syslog_info_printf ("Selected certificate: %s\n", b64data.toLatin1().constData());
+        if (choicesFile->write(b64data.toLatin1()) == -1) {
+            return false;
+        }
+        if (choicesFile->write("\n") == -1) {
+            return false;
+        }
     }
 
     choicesFile->close();
diff -r edbf5e5e88f4 -r a12e6172d82c ui/mainwindow.cpp
--- a/ui/mainwindow.cpp	Thu Sep 11 12:05:24 2014 +0200
+++ b/ui/mainwindow.cpp	Thu Sep 11 12:05:59 2014 +0200
@@ -394,6 +394,8 @@
     if (swAvailableLastMod.isValid()) {
         qDebug() << "Installed an update: " << swInstalledLastMod <<
             " available " << swAvailableLastMod;
+        syslog_info_printf ("Software has been updated to version: %s\n",
+                QApplication::applicationVersion().toUtf8().constData());
         if (swInstalledLastMod == swAvailableLastMod) {
             QString fileName = mSettings.value("Software/available").toString();
             if (fileName.isEmpty()) {
@@ -1243,11 +1245,17 @@
     progress->setMinimumDuration(0);
     progress->show();
 
+    CertificateList *instList = mListToInstall.isValid() ?
+                                &mListToInstall :
+                                &mInstalledList;
+
     InstallWrapper *instWrap = new InstallWrapper(this,
-                                                  mListToInstall.isValid() ?
-                                                  mListToInstall.fileName() :
-                                                  mInstalledList.fileName(),
+                                                  instList->fileName(),
                                                   choices);
+
+    syslog_info_printf ("Installing certificate list: '%s' Version '%s'\n",
+            instList->fileName().toUtf8().constData(),
+            instList->date().toString().toUtf8().constData());
     /* Clean up object and progress dialog */
     connect(instWrap, SIGNAL(finished()), instWrap, SLOT(deleteLater()));
     connect(instWrap, SIGNAL(finished()), progress, SLOT(deleteLater()));


More information about the Trustbridge-commits mailing list