Skip to content

Commit

Permalink
Fixed issue with reloading the Alert log using recents.
Browse files Browse the repository at this point in the history
  • Loading branch information
vargm committed Jan 20, 2022
1 parent 877c205 commit c688431
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/com/pega/gcs/logviewer/LogFileLoadTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.pega.gcs.fringecommon.utilities.GeneralUtilities;
import com.pega.gcs.fringecommon.utilities.KnuthMorrisPrattAlgorithm;
import com.pega.gcs.logviewer.logfile.AbstractLogPattern;
import com.pega.gcs.logviewer.logfile.AbstractLogPattern.LogType;
import com.pega.gcs.logviewer.model.LogEntryModel;
import com.pega.gcs.logviewer.model.LogViewerSetting;
import com.pega.gcs.logviewer.parser.LogParser;
Expand Down Expand Up @@ -99,11 +100,12 @@ public LogFileLoadTask(Component parent, LogTableModel logTableModel, LogViewerS

AbstractLogPattern abstractLogPattern = logParser.getLogPattern();

if (abstractLogPattern != null) {
if ((abstractLogPattern != null) && (!abstractLogPattern.getLogType().equals(LogType.PEGA_ALERT))) {

LOG.info("Using Log Pattern: " + abstractLogPattern);
LogEntryModel logEntryModel;
logEntryModel = logParser.getLogEntryModel();
logTableModel.setLogEntryModel(logEntryModel);

updateLogTableModel(logParser);

} else {
logParser = null;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/pega/gcs/logviewer/LogTableModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public LogEntryModel getLogEntryModel() {
// explicitly setting the lem as the type of model will be known only after
// parsing the log file
public void setLogEntryModel(LogEntryModel logEntryModel) {
LOG.debug("setting LogEntryModel: " + logEntryModel);
this.logEntryModel = logEntryModel;

PropertyChangeSupport propertyChangeSupport = getPropertyChangeSupport();
Expand Down

0 comments on commit c688431

Please sign in to comment.