Skip to content

Commit 4fa7e65

Browse files
Merge pull request #4968 from NativeScript/vladimirov/fix-logs
fix: handle changes in runtimes logs
2 parents 8ec6798 + d794ea6 commit 4fa7e65

File tree

13 files changed

+81559
-63
lines changed

13 files changed

+81559
-63
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
!bin/nativescript.js
66
!vendor/*.js
77
!resources/**
8+
!lib/common/test/resources/**/*
9+
lib/common/test/resources/.DS_Store
810
*.js.map
911
!.travis/**/*
1012
coverage
@@ -80,4 +82,4 @@ lib/common/xunit.xml
8082
lib/common/test-reports.xml
8183
!lib/common/test-scripts/**
8284
!lib/common/scripts/**
83-
config/test-deps-versions-generated.json
85+
config/test-deps-versions-generated.json

Gruntfile.js

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ module.exports = function (grunt) {
125125
"!lib/common/bin/*.js",
126126
"!lib/common/test-scripts/**/*",
127127
"!lib/common/scripts/**/*",
128+
"!lib/common/test/resources/**/*",
128129
"*.tgz"]
129130
},
130131
template: {

lib/common/.gitignore

-38
This file was deleted.

lib/common/mobile/android/logcat-helper.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ export class LogcatHelper implements Mobile.ILogcatHelper {
4949
}
5050
});
5151

52-
lineStream.on('data', (line: Buffer) => {
53-
const lineText = line.toString();
54-
this.$deviceLogProvider.logData(lineText, this.$devicePlatformsConstants.Android, deviceIdentifier);
52+
lineStream.on('data', (lineBuffer: Buffer) => {
53+
const lines = (lineBuffer.toString() || '').split("\n");
54+
for (const line of lines) {
55+
this.$deviceLogProvider.logData(line, this.$devicePlatformsConstants.Android, deviceIdentifier);
56+
}
5557
});
5658
}
5759
}
2.7 MB
Binary file not shown.

0 commit comments

Comments
 (0)