Changeset 812 in ntrip for trunk/BNS


Ignore:
Timestamp:
Apr 9, 2008, 2:34:57 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r811 r812  
    5555    _outFile = new QTextStream(&outFile);
    5656  }
     57
     58  // Log File
     59  // --------
     60  _logFile   = 0;
     61  QFile logFile(settings.value("logFile").toString());
     62  if (logFile.open(QFile::WriteOnly | QFile::Truncate)) {
     63    _logFile = new QTextStream(&logFile);
     64  }
    5765}
    5866
     
    6472  ///  delete _clkSocket;
    6573  delete _outSocket;
     74  delete _outFile;
     75  delete _logFile;
    6676  QMapIterator<QString, t_ephPair*> it(_ephList);
    6777  while (it.hasNext()) {
     
    8595////////////////////////////////////////////////////////////////////////////
    8696void t_bns::slotMessage(const QByteArray msg) {
    87   cout << msg.data() << endl;
     97  if (_logFile) {
     98    *_logFile << msg << endl;
     99  }
    88100  emit(newMessage(msg));
    89101}
     
    92104////////////////////////////////////////////////////////////////////////////
    93105void t_bns::slotError(const QByteArray msg) {
    94   cerr << msg.data() << endl;
     106  if (_logFile) {
     107    *_logFile << msg << endl;
     108  }
    95109  deleteBnsEph();
    96110  emit(error(msg));
  • trunk/BNS/bns.h

    r811 r812  
    5353  QTcpSocket*               _outSocket;
    5454  QTextStream*              _outFile;
     55  QTextStream*              _logFile;
    5556  t_bnseph*                 _bnseph;
    5657  QMutex                    _mutex;
Note: See TracChangeset for help on using the changeset viewer.