Changeset 812 in ntrip for trunk/BNS/bns.cpp
- Timestamp:
- Apr 9, 2008, 2:34:57 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bns.cpp
r811 r812 55 55 _outFile = new QTextStream(&outFile); 56 56 } 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 } 57 65 } 58 66 … … 64 72 /// delete _clkSocket; 65 73 delete _outSocket; 74 delete _outFile; 75 delete _logFile; 66 76 QMapIterator<QString, t_ephPair*> it(_ephList); 67 77 while (it.hasNext()) { … … 85 95 //////////////////////////////////////////////////////////////////////////// 86 96 void t_bns::slotMessage(const QByteArray msg) { 87 cout << msg.data() << endl; 97 if (_logFile) { 98 *_logFile << msg << endl; 99 } 88 100 emit(newMessage(msg)); 89 101 } … … 92 104 //////////////////////////////////////////////////////////////////////////// 93 105 void t_bns::slotError(const QByteArray msg) { 94 cerr << msg.data() << endl; 106 if (_logFile) { 107 *_logFile << msg << endl; 108 } 95 109 deleteBnsEph(); 96 110 emit(error(msg));
Note:
See TracChangeset
for help on using the changeset viewer.