Skip to content

Commit 8469dae

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 6321 b: refs/heads/tswast-patch-1 c: 054ed10 h: refs/heads/master i: 6319: de1ece8
1 parent 83775fb commit 8469dae

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 5029f0049958b844fc40fda1b8e627fa4449e04f
60+
refs/heads/tswast-patch-1: 054ed10544c409f26258fbae3fde57b3f96141cc
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/testing/LocalGcdHelper.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.google.gcloud.datastore.testing;
1818

19+
import static com.google.common.base.MoreObjects.firstNonNull;
1920
import static java.nio.charset.StandardCharsets.UTF_8;
2021

2122
import com.google.common.base.Strings;
@@ -259,6 +260,7 @@ public void run() {
259260
// ignore
260261
}
261262
}
263+
processLogLine(previousLine, firstNonNull(nextLine, ""));
262264
writeLog(currentLogLevel, currentLog);
263265
}
264266

@@ -279,15 +281,17 @@ private void processLogLine(String previousLine, String nextLine) {
279281
} else {
280282
collectionMode = true;
281283
}
282-
} else if (collectionMode && currentLog.length() > LOG_LENGTH_LIMIT) {
283-
collectionMode = false;
284284
} else if (collectionMode) {
285-
if (currentLog.length() == 0) {
285+
if (currentLog.length() > LOG_LENGTH_LIMIT) {
286+
collectionMode = false;
287+
} else if (currentLog.length() == 0) {
286288
// strip level out of the line
287-
currentLog.append(
288-
"GCD" + previousLine.split(":", 2)[1] + System.getProperty("line.separator"));
289+
currentLog.append("GCD");
290+
currentLog.append(previousLine.split(":", 2)[1]);
291+
currentLog.append(System.getProperty("line.separator"));
289292
} else {
290-
currentLog.append(previousLine + System.getProperty("line.separator"));
293+
currentLog.append(previousLine);
294+
currentLog.append(System.getProperty("line.separator"));
291295
}
292296
}
293297
}

0 commit comments

Comments
 (0)