Journal fixes

Handle journal entries that may not contain the _EXE field.
This commit is contained in:
Justin Stephenson 2019-08-13 15:05:16 -04:00
parent a77896f1c2
commit 229671f485

View file

@ -719,7 +719,10 @@ class View extends React.Component {
* Assumes journalctl is not running. * Assumes journalctl is not running.
*/ */
journalctlStart() { journalctlStart() {
let matches = ["_EXE=/usr/bin/tlog-rec-session", "_EXE=/usr/bin/tlog-rec"]; let matches = ["_EXE=/usr/bin/tlog-rec-session",
"_EXE=/usr/bin/tlog-rec", "+",
"_COMM=tlog-rec", "+",
"_COMM=tlog-rec-session"];
if (this.state.username && this.state.username !== "") { if (this.state.username && this.state.username !== "") {
matches.push("TLOG_USER=" + this.state.username); matches.push("TLOG_USER=" + this.state.username);
} }
@ -727,7 +730,7 @@ class View extends React.Component {
matches.push("_HOSTNAME=" + this.state.hostname); matches.push("_HOSTNAME=" + this.state.hostname);
} }
let options = {follow: true, count: "all", merge: true}; let options = {follow: false, count: "all", merge: true};
if (this.state.date_since && this.state.date_since !== "") { if (this.state.date_since && this.state.date_since !== "") {
options['since'] = this.state.date_since; options['since'] = this.state.date_since;