Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 10477)
+++ 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 10477)
+++ 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;
