Index: trunk/BNC/src/bncgetthread.cpp
===================================================================
--- trunk/BNC/src/bncgetthread.cpp	(revision 11153)
+++ trunk/BNC/src/bncgetthread.cpp	(revision 11179)
@@ -131,4 +131,7 @@
   connect(this, SIGNAL(newMessage(QByteArray,bool)),
   BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
+  connect(this, SIGNAL(newLogRecord(t_logRecord,bool)),
+  BNC_CORE, SLOT(slotLogRecord(t_logRecord,bool)));
+  t_logRecord::registerStation(_staID);
 
   _isToBeDeleted = false;
@@ -330,10 +333,10 @@
       _format.indexOf("RTCM2")  != -1 ||
       _format.indexOf("RTCM 2") != -1) {
-    emit(newMessage(_staID + ": Get data in RTCM 2.x format", true));
+    emitFormat(": Get data in RTCM 2.x format", "RTCM2");
     _decoder = new RTCM2Decoder(_staID.data());
   } else if (_format.indexOf("RTCM_3") != -1 ||
       _format.indexOf("RTCM3")  != -1 ||
       _format.indexOf("RTCM 3") != -1) {
-    emit(newMessage(_staID + ": Get data in RTCM 3.x format", true));
+    emitFormat(": Get data in RTCM 3.x format", "RTCM3");
     RTCM3Decoder* newDecoder = new RTCM3Decoder(_staID, _rawFile);
     _decoder = newDecoder;
@@ -341,13 +344,13 @@
         this, SIGNAL(newMessage(QByteArray,bool)));
   } else if (_format == "ZERO") {
-    emit(newMessage(_staID + ": Forward data in original format", true));
+    emitFormat(": Forward data in original format", "ZERO");
     _decoder = new bncZeroDecoder(_staID, false);
   }
   else if (_format == "ZERO2FILE") {
-    emit(newMessage(_staID + ": Get data in original format and store it", true));
+    emitFormat(": Get data in original format and store it", "ZERO2FILE");
     _decoder = new bncZeroDecoder(_staID, true);
   }
   else if (_format.indexOf("RTNET") != -1) {
-    emit(newMessage(_staID + ": Get data in RTNet format", true));
+    emitFormat(": Get data in RTNet format", "RTNET");
     _decoder = new bncRtnetDecoder();
   } else {
@@ -481,4 +484,5 @@
         _format = _rawFile->format();
         _staID = _rawFile->staID();
+        t_logRecord::registerStation(_staID);
 
         QCoreApplication::processEvents();
@@ -508,5 +512,6 @@
           _latencyChecker->checkReconnect();
         }
-        emit(newMessage(_staID + ": Data timeout, reconnecting", true));
+        emit newLogRecord(t_logRecord(t_logRecord::warning, "stream", "stream_timeout", _staID,
+                                      _staID + ": Data timeout, reconnecting"), true);
         msleep(10000); //sleep 10 sec, G. Weber
         continue;
@@ -1143,2 +1148,11 @@
   }
 }
+
+// Message on the data format of the stream
+////////////////////////////////////////////////////////////////////////////
+void bncGetThread::emitFormat(const char* text, const char* decoder) {
+  t_logRecord rec(t_logRecord::info, "stream", "stream_format", _staID, _staID + text);
+  rec.add("decoder", QByteArray(decoder))
+     .add("format", _format);
+  emit newLogRecord(rec, true);
+}
