Skip to content

Commit 0d3cb6d

Browse files
mrh1997Baltech AG
authored and
Baltech AG
committed
Filter irrelevant UIKit Messages from ios log (Unittests have to be adapted)
1 parent cca425e commit 0d3cb6d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/services/ios-log-filter.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class IOSLogFilter implements Mobile.IPlatformLogFilter {
1010
// This: "May 24 15:54:52 Dragons-iPhone NativeScript250(NativeScript)[356] <Notice>: CONSOLE ERROR file:///app/tns_modules/@angular/core/bundles/core.umd.js:3477:36: ORIGINAL STACKTRACE:"
1111
// Becomes: CONSOLE ERROR file:///app/tns_modules/@angular/core/bundles/core.umd.js:3477:36: ORIGINAL STACKTRACE:
1212
protected infoFilterRegex = new RegExp(
13-
`^.*(?:<Notice>:|<Error>:|<Warning>:|\\(NativeScript\\)|${this.appOutputRegex.source}:){1}`
13+
`^.*(?:<Notice>:|<Error>|<Warning>:|${this.appOutputRegex.source}:) CONSOLE {1}`
1414
);
1515

1616
private filterActive: boolean = true;
@@ -67,11 +67,11 @@ export class IOSLogFilter implements Mobile.IPlatformLogFilter {
6767

6868
const filteredLineInfo = currentLine.match(this.infoFilterRegex);
6969
if (filteredLineInfo && filteredLineInfo.length > 0) {
70-
currentLine = currentLine.replace(filteredLineInfo[0], "");
70+
output =
71+
"CONSOLE " +
72+
currentLine.replace(filteredLineInfo[0], "").trim() +
73+
"\n";
7174
}
72-
73-
currentLine = currentLine.trim();
74-
output += currentLine + "\n";
7575
}
7676

7777
return output.length === 0 ? null : output;

0 commit comments

Comments
 (0)