Skip to content

Commit 2c9b46e

Browse files
committed
Update local logging implemenration.
1 parent 53c0f24 commit 2c9b46e

2 files changed

Lines changed: 32 additions & 18 deletions

File tree

gcloud-java-logging/.classpath

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/classes" path="src/main/java">
4+
<attributes>
5+
<attribute name="optional" value="true"/>
6+
<attribute name="maven.pomderived" value="true"/>
7+
</attributes>
8+
</classpathentry>
9+
<classpathentry kind="src" output="target/classes" path="generated/src/main/java">
10+
<attributes>
11+
<attribute name="optional" value="true"/>
12+
<attribute name="maven.pomderived" value="true"/>
13+
</attributes>
14+
</classpathentry>
15+
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
16+
<attributes>
17+
<attribute name="optional" value="true"/>
18+
<attribute name="maven.pomderived" value="true"/>
19+
</attributes>
20+
</classpathentry>
21+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
22+
<attributes>
23+
<attribute name="maven.pomderived" value="true"/>
24+
</attributes>
25+
</classpathentry>
26+
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
27+
<attributes>
28+
<attribute name="maven.pomderived" value="true"/>
29+
</attributes>
30+
</classpathentry>
31+
<classpathentry kind="output" path="target/classes"/>
32+
</classpath>

gcloud-java-logging/src/main/java/com/google/cloud/logging/spi/v2/testing/LocalLoggingImpl.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import com.google.logging.v2.ListMonitoredResourceDescriptorsResponse;
2222
import com.google.logging.v2.LogEntry;
2323
import com.google.logging.v2.LoggingServiceV2Grpc;
24-
import com.google.logging.v2.ReadLogEntriesRequest;
25-
import com.google.logging.v2.ReadLogEntriesResponse;
2624
import com.google.logging.v2.WriteLogEntriesRequest;
2725
import com.google.logging.v2.WriteLogEntriesResponse;
2826
import com.google.protobuf.ByteString;
@@ -77,22 +75,6 @@ public void listLogEntries(
7775
responseObserver.onCompleted();
7876
}
7977

80-
@Override
81-
public void readLogEntries(
82-
ReadLogEntriesRequest request, StreamObserver<ReadLogEntriesResponse> responseObserver) {
83-
List<LogEntry> entries = new ArrayList<>();
84-
for (ByteString proj : request.getProjectIdsList().asByteStringList()) {
85-
String prefix = "projects/" + proj.toStringUtf8() + "/";
86-
for (Map.Entry<String, List<LogEntry>> entry : logs.entrySet()) {
87-
if (entry.getKey().startsWith(prefix)) {
88-
entries.addAll(entry.getValue());
89-
}
90-
}
91-
}
92-
responseObserver.onNext(ReadLogEntriesResponse.newBuilder().addAllEntries(entries).build());
93-
responseObserver.onCompleted();
94-
}
95-
9678
@Override
9779
public void listMonitoredResourceDescriptors(
9880
ListMonitoredResourceDescriptorsRequest request,

0 commit comments

Comments
 (0)