Skip to content

Commit 4ef9ca0

Browse files
committed
loghelper写入
1 parent 2a6cb18 commit 4ef9ca0

File tree

1 file changed

+4
-2
lines changed
  • sdkdemo/src/main/java/com/tencent/iot/explorer/link/demo/common/util

1 file changed

+4
-2
lines changed

sdkdemo/src/main/java/com/tencent/iot/explorer/link/demo/common/util/LogcatHelper.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ public void init(Context context) {
3030
File file = new File(PATH_LOGCAT);
3131
if (!file.exists()) {
3232
if (file.mkdirs()) {
33-
Log.e(TAG, "创建日志目录成功");
33+
Log.e(TAG, "创建日志目录成功,目录为:" + PATH_LOGCAT);
3434
} else {
3535
Log.e(TAG, "创建日志目录失败");
3636
}
37+
}else {
38+
Log.e(TAG, "日志目录已存在,目录为:" + PATH_LOGCAT);
3739
}
3840
}
3941

@@ -96,7 +98,7 @@ public void run() {
9698
while (mRunning && (line = mReader.readLine()) != null) {
9799
if (!mRunning) break;
98100
if (line.length() == 0) continue;
99-
if (out != null && line.contains(mPID) && line.contains("IOT-XP2P")) {
101+
if (out != null && line.contains(mPID) && (line.contains("XP2P") || line.contains("id:msg") || line.contains("VideoTestActivity") || line.contains("VideoPreviewActivity"))) {
100102
out.write((line + "\n").getBytes());
101103
}
102104
}

0 commit comments

Comments
 (0)