Index: trunk/BNC/src/bncmain.cpp
===================================================================
--- trunk/BNC/src/bncmain.cpp	(revision 10478)
+++ trunk/BNC/src/bncmain.cpp	(revision 10479)
@@ -304,4 +304,5 @@
       "   cmbMaxdisplacement {Maximal orbit displacement from the mean of corrections for a satellite [floating-point number]}\n"
       "   cmbSampl           {Clock sampling rate [integer number of seconds: 0|10|20|30|40|50|60]}\n"
+      "   cmbLogpath         {Directory for Combination log files [character string]}\n"
       "   cmbGps             {GPS correction usage [integer number: 0=no,2=yes]}\n"
       "   cmbGlo             {GLONASS correction usage [integer number: 0=no,2=yes]}\n"
Index: trunk/BNC/src/bncsettings.cpp
===================================================================
--- trunk/BNC/src/bncsettings.cpp	(revision 10478)
+++ trunk/BNC/src/bncsettings.cpp	(revision 10479)
@@ -173,4 +173,5 @@
     setValue_p("cmbMaxdisplacement",  "");
     setValue_p("cmbSampl",          "10");
+    setValue_p("cmbLogpath",          "");
     setValue_p("cmbGps",             "2");
     setValue_p("cmbGlo",             "2");
Index: trunk/BNC/src/bncwindow.cpp
===================================================================
--- trunk/BNC/src/bncwindow.cpp	(revision 10478)
+++ trunk/BNC/src/bncwindow.cpp	(revision 10479)
@@ -502,4 +502,6 @@
   _cmbSamplSpinBox->setSuffix(" sec");
 
+  _cmbLogPath = new QLineEdit(settings.value("cmbLogpath").toString());
+
   QPushButton* addCmbRowButton = new QPushButton("Add Row");
   QPushButton* delCmbRowButton = new QPushButton("Delete");
@@ -521,4 +523,5 @@
     enableWidget(true, _cmbMaxdisplacementLineEdit);
     enableWidget(true, _cmbSamplSpinBox);
+    enableWidget(true, _cmbLogPath);
   }
   else {
@@ -527,4 +530,5 @@
     enableWidget(false, _cmbMaxdisplacementLineEdit);
     enableWidget(false, _cmbSamplSpinBox);
+    enableWidget(false, _cmbLogPath);
   }
   _cmbGpsCheckBox = new QCheckBox();
@@ -1288,5 +1292,5 @@
   populateCmbTable();
   cmbLayout->addWidget(_cmbTable,                                                0, 0, 8, 10);
-  cmbLayout->addWidget(new QLabel(" Combine Broadcast Correction streams.<br>"), 0, 10, 1, 10);
+  cmbLayout->addWidget(new QLabel(" Combine Broadcast Correction streams"),      0, 10, 1, 10);
   cmbLayout->addWidget(addCmbRowButton,                                          1, 10);
   cmbLayout->addWidget(delCmbRowButton,                                          1, 11);
@@ -1299,6 +1303,9 @@
   cmbLayout->addWidget(new QLabel("Max Orb Displacement"),                       5, 10, Qt::AlignLeft);
   cmbLayout->addWidget(_cmbMaxdisplacementLineEdit,                              5, 11, Qt::AlignRight);
-  cmbLayout->addWidget(new QLabel("Sampling"),                                   6, 10, Qt::AlignLeft);
-  cmbLayout->addWidget(_cmbSamplSpinBox,                                         6, 11, Qt::AlignRight);
+  cmbLayout->addWidget(new QLabel("Logfile directory"),                          6, 10, Qt::AlignLeft);
+  cmbLayout->addWidget(_cmbLogPath,                                              6, 11, Qt::AlignRight);
+  cmbLayout->addWidget(new QLabel("Sampling"),                                   7, 10, Qt::AlignLeft);
+  cmbLayout->addWidget(_cmbSamplSpinBox,                                         7, 11, Qt::AlignRight);
+
 
   cmbLayout->addWidget(new QLabel("GNSS"),                                       0, 14, Qt::AlignLeft);
@@ -1602,5 +1609,6 @@
   _cmbMaxresLineEdit->setWhatsThis(tr("<p>BNC combines all incoming clocks according to specified weights. Individual clock estimates that differ by more than 'Maximal Clk Residuum' meters from the average of all clocks will be ignored.<p></p>It is suggested to specify a value of about 0.2 m for the Kalman filter combination approach and a value of about 3.0 meters for the Single-Epoch combination approach.</p><p>Default is a value of '999.0'. <i>[key: cmbMaxres]</i></p>"));
   _cmbMaxdisplacementLineEdit->setWhatsThis(tr("<p>BNC builds mean values for all incoming orbit corrections per satellite. Individual orbit corrections that differ by more than 'Maximal Orb Displacement' meters from the average of all orbit corrections per satellite will be ignored.<p></p>It is suggested to specify a value of about 0.5 m.</p><p>Default is a value of '2.0'. <i>[key: cmbMaxdisplacement]</i></p>"));
-  _cmbSamplSpinBox->setWhatsThis(tr("<p>Select a combination Sampling interval for the clocks. Clock corrections will be produced following that interval.</p><p>A value of 10 sec may be an appropriate choice. A value of zero '0' tells BNC to use all available samples. <i>[key:  ]</i></p>"));
+  _cmbSamplSpinBox->setWhatsThis(tr("<p>Select a combination Sampling interval for the clocks. Clock corrections will be produced following that interval.</p><p>A value of 10 sec may be an appropriate choice. A value of zero '0' tells BNC to use all available samples. <i>[key: cmbSampl]</i></p>"));
+  _cmbLogPath->setWhatsThis(tr("<p>Specify a directory for saving daily Combination logfiles. If the specified directory does not exist, BNC will not create such files.</p><p>Default is an empty option field, meaning that no Combination logfiles shall be produced. <i>[key: cmbLogpath]</i></p>"));
   _cmbGpsCheckBox->setWhatsThis(tr("<p>GPS clock corrections shall be combined. GPS Broadcast ephemeris and corrections are required. <i>[key: cmbGps]</i></p>"));
   _cmbGloCheckBox->setWhatsThis(tr("<p>GLONASS clock corrections shall be combined; GLONASS Broadcast ephemeris and corrections are required. <i>[key: cmbGlo]</i></p>"));
@@ -1743,4 +1751,5 @@
   delete _cmbMaxdisplacementLineEdit;
   delete _cmbSamplSpinBox;
+  delete _cmbLogPath;
   delete _cmbMethodComboBox;
   delete _cmbGpsCheckBox;
@@ -2236,4 +2245,5 @@
   settings.setValue("cmbMaxdisplacement", _cmbMaxdisplacementLineEdit->text());
   settings.setValue("cmbSampl",           _cmbSamplSpinBox->value());
+  settings.setValue("cmbLogpath",         _cmbLogPath->text());
   settings.setValue("cmbGps",             _cmbGpsCheckBox->checkState());
   settings.setValue("cmbGlo",             _cmbGloCheckBox->checkState());
@@ -2770,4 +2780,5 @@
       enableWidget(true, _cmbMaxdisplacementLineEdit);
       enableWidget(true, _cmbSamplSpinBox);
+      enableWidget(true, _cmbLogPath);
       enableWidget(true, _cmbGpsCheckBox);
       enableWidget(true, _cmbGloCheckBox);
@@ -2784,4 +2795,5 @@
       enableWidget(false, _cmbMaxdisplacementLineEdit);
       enableWidget(false, _cmbSamplSpinBox);
+      enableWidget(false, _cmbLogPath);
       enableWidget(false, _cmbGpsCheckBox);
       enableWidget(false, _cmbGloCheckBox);
@@ -2893,4 +2905,5 @@
     enableWidget(false, _cmbMaxdisplacementLineEdit);
     enableWidget(false, _cmbSamplSpinBox);
+    enableWidget(false, _cmbLogPath);
   }
 }
Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 10478)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 10479)
@@ -313,4 +313,22 @@
   }
 
+  // Logfile
+  // -------
+  QString intr = "1 day";
+  QString logFileCmb = settings.value("cmbLogpath").toString();
+  int l = logFileCmb.length();
+  if (logFileCmb.isEmpty()) {
+    _logFile = 0;
+  }
+  else {
+    if (l && logFileCmb[l-1] != QDir::separator() ) {
+      logFileCmb += QDir::separator();
+    }
+
+    logFileCmb = logFileCmb + "COMB00BNC" + "${V3PROD}" + ".CMB";
+
+    _logFile = new bncoutf(logFileCmb, intr, _cmbSampl);
+  }
+
   _newCorr = 0;
 }
@@ -345,4 +363,5 @@
   delete _antex;
   delete _bsx;
+  delete _logFile;
 
   QMapIterator<char, unsigned> itSys(_cmbSysPrn);
@@ -518,9 +537,7 @@
       if ((newClk._time >= currentTime) ||       // future time stamp
           (currentTime - newClk._time) > 60.0) { // very old data sets
-  #ifdef BNC_DEBUG_CMB
         emit newMessage("bncComb: future or very old data sets: " + acName.toLatin1() + " " + newClk._prn.toString().c_str() +
             QString(" %1 ").arg(newClk._time.timestr().c_str()).toLatin1() + "vs. current time" +
             QString(" %1 ").arg(currentTime.timestr().c_str()).toLatin1(), true);
-  #endif
         continue;
       }
@@ -530,9 +547,7 @@
     // --------------------
     if (_resTime.valid() && newClk._time <= _resTime) {
-#ifdef BNC_DEBUG_CMB
       emit newMessage("bncComb: old correction: " + acName.toLatin1() + " " + newClk._prn.toString().c_str() +
           QString(" %1 ").arg(newClk._time.timestr().c_str()).toLatin1() + "vs. last processing Epoch" +
           QString(" %1 ").arg(_resTime.timestr().c_str()).toLatin1(), true);
-#endif
       continue;
     }
@@ -711,7 +726,5 @@
     t_eph* ephPrev = _ephUser.ephPrev(prn);
     if (ephLast == 0) {
-#ifdef BNC_DEBUG_CMB
       emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1(), true);
-#endif
       delete _newCorr; _newCorr = 0;
       continue;
@@ -721,7 +734,5 @@
              ephLast->checkState() == t_eph::outdated ||
              ephLast->checkState() == t_eph::unhealthy) {
-#ifdef BNC_DEBUG_CMB
       emit newMessage("bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prn.mid(0,3).toLatin1(), true);
-#endif
       delete _newCorr; _newCorr = 0;
       continue;
@@ -739,8 +750,6 @@
       }
       else {
-#ifdef BNC_DEBUG_CMB
         emit newMessage("bncComb: eph not found for "  + prn.mid(0,3).toLatin1() +
                         QString(" with IOD %1").arg(_newCorr->_iod).toLatin1(), true);
-#endif
         delete _newCorr; _newCorr = 0;
         continue;
@@ -815,5 +824,8 @@
     processSystem(epoTime, sys, out);
     _buffer.remove(sys);
-    emit newMessage(_log, false);
+    //emit newMessage(_log, false);
+    if (_logFile) {
+      _logFile->write(epoTime.gpsw(),epoTime.gpssec(), QString(_log));
+    }
   }
 }
Index: trunk/BNC/src/combination/bnccomb.h
===================================================================
--- trunk/BNC/src/combination/bnccomb.h	(revision 10478)
+++ trunk/BNC/src/combination/bnccomb.h	(revision 10479)
@@ -16,4 +16,5 @@
 #include "satObs.h"
 #include "bncconst.h"
+#include "bncoutf.h"
 #include "../RTCM3/clock_and_orbit/clock_orbit_rtcm.h"
 #include "../RTCM3/clock_and_orbit/clock_orbit_igs.h"
@@ -257,4 +258,5 @@
   bncAntex*                                  _antex;
   bncBiasSnx*                                _bsx;
+  bncoutf*                                   _logFile;
   double                                     _MAX_RES;
   double                                     _MAX_DISPLACEMENT;
