Changeset 11185 in ntrip for trunk/BNC/src/bncwindow.cpp
- Timestamp:
- Nov 9, 2026, 12:15:48 PM (6 hours ago)
- File:
-
- 1 edited
-
trunk/BNC/src/bncwindow.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncwindow.cpp
r11179 r11185 207 207 _logFormatStructuredComboBox->setCurrentIndex(kLogFmt); 208 208 } 209 _logLevelStructuredComboBox = new QComboBox(); 210 _logLevelStructuredComboBox->setEditable(false); 211 _logLevelStructuredComboBox->addItems(QString("debug,info,warning,error").split(",")); 212 int kLogLev = _logLevelStructuredComboBox->findText(settings.value("logLevelStructured").toString()); 213 if (kLogLev != -1) { 214 _logLevelStructuredComboBox->setCurrentIndex(kLogLev); 215 } 209 216 _rawOutFileLineEdit = new QLineEdit(settings.value("rawOutFile").toString()); 210 217 _ephMountLineEdit = new QLineEdit(settings.value("ephMount").toString()); … … 855 862 gLayout->addWidget(_logFileLineEdit, 1, 1, 1, 20); 856 863 gLayout->addWidget(new QLabel("Structured logfile"), 2, 0); 857 gLayout->addWidget(_logFileStructuredLineEdit, 2, 1, 1, 15); 858 gLayout->addWidget(new QLabel(" Format"), 2, 16, Qt::AlignRight); 859 gLayout->addWidget(_logFormatStructuredComboBox, 2, 17, 1, 4); 864 gLayout->addWidget(_logFileStructuredLineEdit, 2, 1, 1, 10); 865 gLayout->addWidget(new QLabel(" Format"), 2, 11, Qt::AlignRight); 866 gLayout->addWidget(_logFormatStructuredComboBox, 2, 12, 1, 3); 867 gLayout->addWidget(new QLabel(" Min. level"), 2, 15, Qt::AlignRight); 868 gLayout->addWidget(_logLevelStructuredComboBox, 2, 16, 1, 5); 860 869 gLayout->addWidget(new QLabel("Append files"), 3, 0); 861 870 gLayout->addWidget(_rnxAppendCheckBox, 3, 1); … … 1580 1589 // ------------------ 1581 1590 _logFileLineEdit->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Log' tab on the bottom of this window. They can be saved into a file when a valid path for that is specified in the 'Logfile (full path)' field.</p><p>The logfile name will automatically be extended by a string '_YYMMDD' carrying the current date. <i>[key: logFile]</i></p>")); 1582 _logFileStructuredLineEdit->setWhatsThis(tr("<p>In addition to the logfile, BNC can write the same records as a structured logfile for log processing tools: one record per line, either JSON (JSON Lines) or logfmt (key=value pairs separated by blanks). Each record carries the time in UTC ('time', ISO 8601 with 'Z') and in GPS time ('gpst'), a level (info, warning, error), the component (e.g. stream, ppp), the event (e.g. ppp_position, stream_outage_begin), the station if known, the event's fields, the text of the classic logfile ('msg') and the record version ('v').</p><p>Messages without own event are written with component 'bnc' and event 'message'; their level is derived from keywords of the text. The logfile itself remains unchanged.</p><p>The file name will automatically be extended by a string '_YYMMDD' carrying the current date. Default is an empty option field, meaning that no structured logfile is written. <i>[key: logFileStructured]</i></p>"));1591 _logFileStructuredLineEdit->setWhatsThis(tr("<p>In addition to the logfile, BNC can write the same records as a structured logfile for log processing tools: one record per line, either JSON (JSON Lines) or logfmt (key=value pairs separated by blanks). Each record carries the time in UTC ('time', ISO 8601 with 'Z') and in GPS time ('gpst'), a level (debug, info, warning, error), the component (e.g. stream, ppp, cmb), the event (e.g. ppp_position, stream_outage_begin), the stream (mountpoint) or PPP station if known, the event's fields, the text of the classic logfile ('msg') and the record version ('v').</p><p>Messages without own event are written with event 'message' and the component of their origin; their level is error (a function does not work), warning (data or configuration problem, BNC continues) or info (status). The logfile itself remains unchanged.</p><p>The file name will automatically be extended by a string '_YYMMDD' carrying the current date. Default is an empty option field, meaning that no structured logfile is written. <i>[key: logFileStructured]</i></p>")); 1583 1592 _logFormatStructuredComboBox->setWhatsThis(tr("<p>Select the format of the structured logfile: 'json' for one JSON object per line (JSON Lines), 'logfmt' for key=value pairs. Default is 'json'. <i>[key: logFormatStructured]</i></p>")); 1593 _logLevelStructuredComboBox->setWhatsThis(tr("<p>Select the minimum level of the records written into the structured logfile: 'debug' writes all records (debug records exist only in BNC versions built with the BNC_DEBUG_* defines), 'info' leaves out the debug records, 'warning' writes warnings and errors only, 'error' errors only. The logfile is not affected. Default is 'debug'. <i>[key: logLevelStructured]</i></p>")); 1584 1594 _rnxAppendCheckBox->setWhatsThis(tr("<p>When BNC is started, new files are created by default and file content already available under the same name will be overwritten. However, users might want to append already existing files following a regular restart or a crash of BNC or its platform.</p><p>Tick 'Append files' to continue with existing files and keep what has been recorded so far. <i>[key: rnxAppend]</i></p>")); 1585 1595 _onTheFlyComboBox->setWhatsThis(tr("<p>When operating BNC online in 'no window' mode, some configuration parameters can be changed on-the-fly without interrupting the running process. For that BNC rereads parts of its configuration in pre-defined intervals. The default entry is 'no' that means the reread function is switched of. <p></p>Select '1 min', '5 min', '1 hour', or '1 day' to force BNC to reread its configuration every full minute, five minutes, hour, or day and let in between edited configuration options become effective on-the-fly without terminating uninvolved threads.</p><p>Note that when operating BNC in window mode, on-the-fly changeable configuration options become effective immediately via button 'Save & Reread Configuration'. <i>[key: onTheFlyInterval]</i></p>")); … … 1897 1907 delete _logFileStructuredLineEdit; 1898 1908 delete _logFormatStructuredComboBox; 1909 delete _logLevelStructuredComboBox; 1899 1910 delete _rawOutFileLineEdit; 1900 1911 delete _ephMountLineEdit; … … 2432 2443 settings.setValue("logFileStructured", _logFileStructuredLineEdit->text()); 2433 2444 settings.setValue("logFormatStructured", _logFormatStructuredComboBox->currentText()); 2445 settings.setValue("logLevelStructured", _logLevelStructuredComboBox->currentText()); 2434 2446 settings.setValue("rnxAppend", _rnxAppendCheckBox->checkState()); 2435 2447 settings.setValue("onTheFlyInterval", _onTheFlyComboBox->currentText()); … … 2568 2580 //////////////////////////////////////////////////////////////////////////// 2569 2581 void bncWindow::slotGetThreadsFinished() { 2570 BNC_CORE-> slotMessage("All Get Threads Terminated", true);2582 BNC_CORE->message("All Get Threads Terminated", true, "bnc", t_logRecord::info); 2571 2583 delete _caster; _caster = 0; BNC_CORE->setCaster(0); 2572 2584 delete _casterEph; _casterEph = 0; … … 2638 2650 connect(_caster, SIGNAL(mountPointsRead(QList<bncGetThread*>)), this, SLOT(slotMountPointsRead(QList<bncGetThread*>))); 2639 2651 2640 BNC_CORE-> slotMessage("========== Start BNC v" BNCVERSION " (" BNC_OS ") ==========", true);2652 BNC_CORE->message("========== Start BNC v" BNCVERSION " (" BNC_OS ") ==========", true, "bnc", t_logRecord::info); 2641 2653 2642 2654 bncSettings settings; … … 2645 2657 // ------------- 2646 2658 if (!_rnxPathLineEdit->text().isEmpty()) 2647 BNC_CORE-> slotMessage("Panel 'RINEX Observations' active", true);2659 BNC_CORE->message("Panel 'RINEX Observations' active", true, "bnc", t_logRecord::info); 2648 2660 if (!_ephPathLineEdit->text().isEmpty()) 2649 BNC_CORE-> slotMessage("Panel 'RINEX Ephemeris' active", true);2661 BNC_CORE->message("Panel 'RINEX Ephemeris' active", true, "bnc", t_logRecord::info); 2650 2662 if (!_corrPathLineEdit->text().isEmpty()) 2651 BNC_CORE-> slotMessage("Panel 'Broadcast Corrections' active", true);2663 BNC_CORE->message("Panel 'Broadcast Corrections' active", true, "bnc", t_logRecord::info); 2652 2664 if (!_outPortLineEdit->text().isEmpty()) 2653 BNC_CORE-> slotMessage("Panel 'Feed Engine' active", true);2665 BNC_CORE->message("Panel 'Feed Engine' active", true, "bnc", t_logRecord::info); 2654 2666 if (!_serialMountPointLineEdit->text().isEmpty()) 2655 BNC_CORE-> slotMessage("Panel 'Serial Output' active", true);2667 BNC_CORE->message("Panel 'Serial Output' active", true, "bnc", t_logRecord::info); 2656 2668 if (!_adviseObsRateComboBox->currentText().isEmpty()) 2657 BNC_CORE-> slotMessage("Panel 'Outages' active", true);2669 BNC_CORE->message("Panel 'Outages' active", true, "bnc", t_logRecord::info); 2658 2670 if (!_miscMountLineEdit->text().isEmpty()) 2659 BNC_CORE-> slotMessage("Panel 'Miscellaneous' active", true);2671 BNC_CORE->message("Panel 'Miscellaneous' active", true, "bnc", t_logRecord::info); 2660 2672 if (_pppWidgets._dataSource->currentText() == "Real-Time Streams") 2661 BNC_CORE-> slotMessage("Panel 'PPP' active", true);2673 BNC_CORE->message("Panel 'PPP' active", true, "bnc", t_logRecord::info); 2662 2674 if (_cmbTable->rowCount() > 0) 2663 BNC_CORE-> slotMessage("Panel 'Combine Corrections' active", true);2675 BNC_CORE->message("Panel 'Combine Corrections' active", true, "bnc", t_logRecord::info); 2664 2676 if (_uploadTable->rowCount() > 0) 2665 BNC_CORE-> slotMessage("Panel 'Upload Corrections' active", true);2677 BNC_CORE->message("Panel 'Upload Corrections' active", true, "bnc", t_logRecord::info); 2666 2678 if (_uploadEphTable->rowCount() > 0) 2667 BNC_CORE-> slotMessage("Panel 'UploadEphemeris' active", true);2679 BNC_CORE->message("Panel 'UploadEphemeris' active", true, "bnc", t_logRecord::info); 2668 2680 2669 2681 QDir rnxdir(settings.value("rnxPath").toString()); 2670 if (!rnxdir.exists()) BNC_CORE-> slotMessage("Cannot find RINEX Observations directory", true);2682 if (!rnxdir.exists()) BNC_CORE->message("Cannot find RINEX Observations directory", true, "bnc", t_logRecord::error); 2671 2683 2672 2684 QString rnx_file = settings.value("rnxScript").toString(); 2673 2685 if (!rnx_file.isEmpty()) { 2674 2686 QFile rnxfile(settings.value("rnxScript").toString()); 2675 if (!rnxfile.exists()) BNC_CORE-> slotMessage("Cannot find RINEX Observations script", true);2687 if (!rnxfile.exists()) BNC_CORE->message("Cannot find RINEX Observations script", true, "bnc", t_logRecord::error); 2676 2688 } 2677 2689 2678 2690 QDir ephdir(settings.value("ephPath").toString()); 2679 if (!ephdir.exists()) BNC_CORE-> slotMessage("Cannot find RINEX Ephemeris directory", true);2691 if (!ephdir.exists()) BNC_CORE->message("Cannot find RINEX Ephemeris directory", true, "bnc", t_logRecord::error); 2680 2692 2681 2693 QDir corrdir(settings.value("corrPath").toString()); 2682 if (!corrdir.exists()) BNC_CORE-> slotMessage("Cannot find Broadcast Corrections directory", true);2694 if (!corrdir.exists()) BNC_CORE->message("Cannot find Broadcast Corrections directory", true, "bnc", t_logRecord::error); 2683 2695 2684 2696 QString advise_file = settings.value("adviseScript").toString(); 2685 2697 if (!advise_file.isEmpty()) { 2686 2698 QFile advisefile(settings.value("adviseScript").toString()); 2687 if (!advisefile.exists()) BNC_CORE-> slotMessage("Cannot find Outages script", true);2699 if (!advisefile.exists()) BNC_CORE->message("Cannot find Outages script", true, "bnc", t_logRecord::error); 2688 2700 } 2689 2701
Note:
See TracChangeset
for help on using the changeset viewer.
