Invalid log message format format
This commit is contained in:
parent
d52128dee1
commit
a8723f07a8
@ -114,10 +114,16 @@ export class GatewayLogsComponent implements AfterViewInit {
|
|||||||
const result = {
|
const result = {
|
||||||
ts: data[0],
|
ts: data[0],
|
||||||
key: this.activeLink.key,
|
key: this.activeLink.key,
|
||||||
message: /\[(.*)/.exec(data[1])[0],
|
message: data[1],
|
||||||
status: 'INVALID LOG FORMAT' as GatewayStatus
|
status: 'INVALID LOG FORMAT' as GatewayStatus
|
||||||
};
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
result.message = /\[(.*)/.exec(data[1])[0];
|
||||||
|
} catch (e) {
|
||||||
|
result.message = data[1];
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result.status = data[1].match(/\|(\w+)\|/)[1];
|
result.status = data[1].match(/\|(\w+)\|/)[1];
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user