changeset 1082:a12e6172d82c

Extend logging to all choices and SW updates.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 11 Sep 2014 12:05:59 +0200
parents edbf5e5e88f4
children d6dc1144895b
files ui/installwrapper.cpp ui/mainwindow.cpp
diffstat 2 files changed, 18 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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();
--- 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()));

http://wald.intevation.org/projects/trustbridge/