Skip to content

Commit c688431

Browse files
committed
Fixed issue with reloading the Alert log using recents.
1 parent 877c205 commit c688431

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/main/java/com/pega/gcs/logviewer/LogFileLoadTask.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import com.pega.gcs.fringecommon.utilities.GeneralUtilities;
4040
import com.pega.gcs.fringecommon.utilities.KnuthMorrisPrattAlgorithm;
4141
import com.pega.gcs.logviewer.logfile.AbstractLogPattern;
42+
import com.pega.gcs.logviewer.logfile.AbstractLogPattern.LogType;
4243
import com.pega.gcs.logviewer.model.LogEntryModel;
4344
import com.pega.gcs.logviewer.model.LogViewerSetting;
4445
import com.pega.gcs.logviewer.parser.LogParser;
@@ -99,11 +100,12 @@ public LogFileLoadTask(Component parent, LogTableModel logTableModel, LogViewerS
99100

100101
AbstractLogPattern abstractLogPattern = logParser.getLogPattern();
101102

102-
if (abstractLogPattern != null) {
103+
if ((abstractLogPattern != null) && (!abstractLogPattern.getLogType().equals(LogType.PEGA_ALERT))) {
104+
103105
LOG.info("Using Log Pattern: " + abstractLogPattern);
104-
LogEntryModel logEntryModel;
105-
logEntryModel = logParser.getLogEntryModel();
106-
logTableModel.setLogEntryModel(logEntryModel);
106+
107+
updateLogTableModel(logParser);
108+
107109
} else {
108110
logParser = null;
109111
}

src/main/java/com/pega/gcs/logviewer/LogTableModel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public LogEntryModel getLogEntryModel() {
6868
// explicitly setting the lem as the type of model will be known only after
6969
// parsing the log file
7070
public void setLogEntryModel(LogEntryModel logEntryModel) {
71+
LOG.debug("setting LogEntryModel: " + logEntryModel);
7172
this.logEntryModel = logEntryModel;
7273

7374
PropertyChangeSupport propertyChangeSupport = getPropertyChangeSupport();

0 commit comments

Comments
 (0)