deleteSinkAsync(String sink) {
return transform(rpc.delete(request), EMPTY_TO_BOOLEAN_FUNCTION);
}
+ /**
+ * Creates a new {@code ListLogsRequest} object.
+ *
+ * Builds an instance of {@code ListLogsRequest} using page size, page token and project id
+ * from the {@code LoggingOptions}. The project id is used as the request's parent parameter.
+ *
+ * @see com.google.logging.v2.ListLogEntriesRequest
+ * @return the created {@code ListLogsRequest} object
+ */
+ private static ListLogsRequest listLogsRequest(
+ LoggingOptions serviceOptions, Map options) {
+ ListLogsRequest.Builder builder = ListLogsRequest.newBuilder();
+ builder.setParent(ProjectName.of(serviceOptions.getProjectId()).toString());
+ Integer pageSize = PAGE_SIZE.get(options);
+ String pageToken = PAGE_TOKEN.get(options);
+ if (pageSize != null) {
+ builder.setPageSize(pageSize);
+ }
+ if (pageToken != null) {
+ builder.setPageToken(pageToken);
+ }
+ return builder.build();
+ }
+
+ private static ApiFuture> listLogsAsync(
+ final LoggingOptions serviceOptions, final Map options) {
+ final ListLogsRequest request = listLogsRequest(serviceOptions, options);
+ ApiFuture list = serviceOptions.getLoggingRpcV2().listLogs(request);
+ return transform(
+ list,
+ new Function>() {
+ @Override
+ public AsyncPage apply(ListLogsResponse listLogsResponse) {
+ List logNames =
+ listLogsResponse.getLogNamesList() == null
+ ? ImmutableList.of()
+ : listLogsResponse.getLogNamesList();
+ String cursor =
+ listLogsResponse.getNextPageToken().equals("")
+ ? null
+ : listLogsResponse.getNextPageToken();
+ return new AsyncPageImpl<>(
+ new LogNamePageFetcher(serviceOptions, cursor, options), cursor, logNames);
+ }
+ });
+ }
+
+ @Override
+ public Page listLogs(ListOption... options) {
+ return get(listLogsAsync(options));
+ }
+
+ @Override
+ public ApiFuture> listLogsAsync(ListOption... options) {
+ return listLogsAsync(getOptions(), optionMap(options));
+ }
+
public boolean deleteLog(String log) {
return get(deleteLogAsync(log));
}
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java
index 6b9730c66..9217bd4ea 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/GrpcLoggingRpc.java
@@ -61,6 +61,8 @@
import com.google.logging.v2.ListLogEntriesResponse;
import com.google.logging.v2.ListLogMetricsRequest;
import com.google.logging.v2.ListLogMetricsResponse;
+import com.google.logging.v2.ListLogsRequest;
+import com.google.logging.v2.ListLogsResponse;
import com.google.logging.v2.ListMonitoredResourceDescriptorsRequest;
import com.google.logging.v2.ListMonitoredResourceDescriptorsResponse;
import com.google.logging.v2.ListSinksRequest;
@@ -260,6 +262,11 @@ public ApiFuture delete(DeleteExclusionRequest request) {
StatusCode.Code.NOT_FOUND);
}
+ @Override
+ public ApiFuture listLogs(ListLogsRequest request) {
+ return translate(loggingClient.listLogsCallable().futureCall(request), true);
+ }
+
@Override
public ApiFuture delete(DeleteLogRequest request) {
return translate(
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingRpc.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingRpc.java
index 06e4c068b..a41b35d24 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingRpc.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingRpc.java
@@ -34,6 +34,8 @@
import com.google.logging.v2.ListLogEntriesResponse;
import com.google.logging.v2.ListLogMetricsRequest;
import com.google.logging.v2.ListLogMetricsResponse;
+import com.google.logging.v2.ListLogsRequest;
+import com.google.logging.v2.ListLogsResponse;
import com.google.logging.v2.ListMonitoredResourceDescriptorsRequest;
import com.google.logging.v2.ListMonitoredResourceDescriptorsResponse;
import com.google.logging.v2.ListSinksRequest;
@@ -93,6 +95,18 @@ public interface LoggingRpc extends AutoCloseable, ServiceRpc {
*/
ApiFuture delete(DeleteSinkRequest request);
+ /**
+ * Sends a request to list the log names in a project. This method returns a {@code ApiFuture}
+ * object to consume the result. {@link ApiFuture#get()} returns a response object containing the
+ * listing result.
+ *
+ * @param request the request object containing all of the parameters for the API call
+ */
+ default ApiFuture listLogs(ListLogsRequest request) {
+ throw new UnsupportedOperationException(
+ "method list(ListLogsRequest request) does not have default implementation");
+ }
+
/**
* Sends a request to deletes a log. This method returns a {@code ApiFuture} object to consume the
* result. {@link ApiFuture#get()} returns {@link Empty#getDefaultInstance()} or {@code null} if
diff --git a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java
index fe34719d8..d1cd5946e 100644
--- a/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java
+++ b/google-cloud-logging/src/test/java/com/google/cloud/logging/LoggingImplTest.java
@@ -63,6 +63,8 @@
import com.google.logging.v2.ListLogEntriesResponse;
import com.google.logging.v2.ListLogMetricsRequest;
import com.google.logging.v2.ListLogMetricsResponse;
+import com.google.logging.v2.ListLogsRequest;
+import com.google.logging.v2.ListLogsResponse;
import com.google.logging.v2.ListMonitoredResourceDescriptorsRequest;
import com.google.logging.v2.ListMonitoredResourceDescriptorsResponse;
import com.google.logging.v2.ListSinksRequest;
@@ -106,6 +108,9 @@ public class LoggingImplTest {
com.google.api.MonitoredResourceDescriptor.getDefaultInstance();
private static final MonitoredResourceDescriptor DESCRIPTOR =
MonitoredResourceDescriptor.fromPb(DESCRIPTOR_PB);
+ private static final String LOG_NAME1 = "test-list-log-name-1";
+ private static final String LOG_NAME2 = "test-list-log-name-2";
+ private static final String LOG_NAMES_CURSOR = "cursor";
private static final String LOG_NAME = "log";
private static final String LOG_NAME_PB = "projects/" + PROJECT + "/logs/" + LOG_NAME;
private static final MonitoredResource MONITORED_RESOURCE =
@@ -173,6 +178,40 @@ public com.google.api.MonitoredResourceDescriptor apply(
private LoggingRpc loggingRpcMock;
private Logging logging;
+ private void configureListLogsTests(List returnedList, String cursor) {
+ ListLogsRequest request = ListLogsRequest.newBuilder().setParent(PROJECT_PB).build();
+ ListLogsResponse response =
+ ListLogsResponse.newBuilder().setNextPageToken(cursor).addAllLogNames(returnedList).build();
+ ApiFuture futureResponse = ApiFutures.immediateFuture(response);
+ EasyMock.expect(loggingRpcMock.listLogs(request)).andReturn(futureResponse);
+ EasyMock.replay(loggingRpcMock);
+ }
+
+ private void configureListLogsTests(
+ List page1ReturnedList,
+ List page2ReturnedList,
+ String page1Cursor,
+ String page2Cursor) {
+ ListLogsRequest request1 = ListLogsRequest.newBuilder().setParent(PROJECT_PB).build();
+ ListLogsRequest request2 =
+ ListLogsRequest.newBuilder().setParent(PROJECT_PB).setPageToken(page1Cursor).build();
+ ListLogsResponse response1 =
+ ListLogsResponse.newBuilder()
+ .setNextPageToken(page1Cursor)
+ .addAllLogNames(page1ReturnedList)
+ .build();
+ ListLogsResponse response2 =
+ ListLogsResponse.newBuilder()
+ .setNextPageToken(page2Cursor)
+ .addAllLogNames(page2ReturnedList)
+ .build();
+ ApiFuture futureResponse1 = ApiFutures.immediateFuture(response1);
+ ApiFuture futureResponse2 = ApiFutures.immediateFuture(response2);
+ EasyMock.expect(loggingRpcMock.listLogs(request1)).andReturn(futureResponse1);
+ EasyMock.expect(loggingRpcMock.listLogs(request2)).andReturn(futureResponse2);
+ EasyMock.replay(loggingRpcMock);
+ }
+
@Before
public void setUp() {
rpcFactoryMock = EasyMock.createStrictMock(LoggingRpcFactory.class);
@@ -187,8 +226,10 @@ public void setUp() {
.build();
// By default when calling ListLogEntries, we append a filter of last 24 hours.
- // However when testing, the time when it was called by the test and by the method
- // implementation might differ by microseconds so we use the same time filter implementation
+ // However when testing, the time when it was called by the test and by the
+ // method
+ // implementation might differ by microseconds so we use the same time filter
+ // implementation
// for test and in "real" method
LoggingImpl.defaultTimestampFilterCreator =
new ITimestampDefaultFilter() {
@@ -1576,6 +1617,89 @@ public void testListResourceDescriptorAsyncWithOptions()
Iterables.toArray(page.getValues(), MonitoredResourceDescriptor.class));
}
+ @Test
+ public void testListLogsWithLogNames() {
+ EasyMock.replay(rpcFactoryMock);
+ logging = options.getService();
+ List logNames = ImmutableList.of(LOG_NAME1, LOG_NAME2);
+ configureListLogsTests(logNames, LOG_NAMES_CURSOR);
+
+ Page page = logging.listLogs();
+ assertEquals(LOG_NAMES_CURSOR, page.getNextPageToken());
+ assertArrayEquals(logNames.toArray(), Iterables.toArray(page.getValues(), String.class));
+ }
+
+ @Test
+ public void testListLogsWithEmptySet() {
+ EasyMock.replay(rpcFactoryMock);
+ logging = options.getService();
+ List emptyList = ImmutableList.of();
+ configureListLogsTests(emptyList, LOG_NAMES_CURSOR);
+
+ Page page = logging.listLogs();
+ assertEquals(LOG_NAMES_CURSOR, page.getNextPageToken());
+ assertArrayEquals(emptyList.toArray(), Iterables.toArray(page.getValues(), String.class));
+ }
+
+ @Test
+ public void testListLogsNextPageWithLogNames() throws ExecutionException, InterruptedException {
+ EasyMock.replay(rpcFactoryMock);
+ logging = options.getService();
+ List logNames1 = ImmutableList.of(LOG_NAME1, LOG_NAME2);
+ List logNames2 = ImmutableList.of(LOG_NAME1);
+ String nextPageCursor = "nextCursor";
+ configureListLogsTests(logNames1, logNames2, LOG_NAMES_CURSOR, nextPageCursor);
+
+ Page page = logging.listLogs();
+ assertEquals(LOG_NAMES_CURSOR, page.getNextPageToken());
+ assertArrayEquals(logNames1.toArray(), Iterables.toArray(page.getValues(), String.class));
+ page = page.getNextPage();
+ assertEquals(nextPageCursor, page.getNextPageToken());
+ assertArrayEquals(logNames2.toArray(), Iterables.toArray(page.getValues(), String.class));
+ }
+
+ @Test
+ public void testListLogsAsyncWithLogNames() throws ExecutionException, InterruptedException {
+ EasyMock.replay(rpcFactoryMock);
+ logging = options.getService();
+ List logNames = ImmutableList.of(LOG_NAME1, LOG_NAME2);
+ configureListLogsTests(logNames, LOG_NAMES_CURSOR);
+
+ AsyncPage page = logging.listLogsAsync().get();
+ assertEquals(LOG_NAMES_CURSOR, page.getNextPageToken());
+ assertArrayEquals(logNames.toArray(), Iterables.toArray(page.getValues(), String.class));
+ }
+
+ @Test
+ public void testListLogsAsyncWithEmptySet() throws ExecutionException, InterruptedException {
+ EasyMock.replay(rpcFactoryMock);
+ logging = options.getService();
+ List emptyList = ImmutableList.of();
+ configureListLogsTests(emptyList, LOG_NAMES_CURSOR);
+
+ AsyncPage page = logging.listLogsAsync().get();
+ assertEquals(LOG_NAMES_CURSOR, page.getNextPageToken());
+ assertArrayEquals(emptyList.toArray(), Iterables.toArray(page.getValues(), String.class));
+ }
+
+ @Test
+ public void testListLogsAsyncNextPageWithLogNames()
+ throws ExecutionException, InterruptedException {
+ EasyMock.replay(rpcFactoryMock);
+ logging = options.getService();
+ List logNames1 = ImmutableList.of(LOG_NAME1, LOG_NAME2);
+ List logNames2 = ImmutableList.of(LOG_NAME1);
+ String nextPageCursor = "nextCursor";
+ configureListLogsTests(logNames1, logNames2, LOG_NAMES_CURSOR, nextPageCursor);
+
+ AsyncPage page = logging.listLogsAsync().get();
+ assertEquals(LOG_NAMES_CURSOR, page.getNextPageToken());
+ assertArrayEquals(logNames1.toArray(), Iterables.toArray(page.getValues(), String.class));
+ page = page.getNextPageAsync().get();
+ assertEquals(nextPageCursor, page.getNextPageToken());
+ assertArrayEquals(logNames2.toArray(), Iterables.toArray(page.getValues(), String.class));
+ }
+
@Test
public void testDeleteLog() {
DeleteLogRequest request = DeleteLogRequest.newBuilder().setLogName(LOG_NAME_PB).build();
@@ -2034,7 +2158,8 @@ public void testFlushStress() throws InterruptedException {
EasyMock.expect(loggingRpcMock.write(request)).andReturn(mockRpcResponse).times(threads.length);
EasyMock.replay(loggingRpcMock);
- // log and flush concurrently in many threads to trigger a ConcurrentModificationException
+ // log and flush concurrently in many threads to trigger a
+ // ConcurrentModificationException
final AtomicInteger exceptions = new AtomicInteger(0);
for (int i = 0; i < threads.length; i++) {
threads[i] =
diff --git a/samples/snippets/src/main/java/com/example/logging/ListLogEntries.java b/samples/snippets/src/main/java/com/example/logging/ListLogEntries.java
new file mode 100644
index 000000000..8c5131f41
--- /dev/null
+++ b/samples/snippets/src/main/java/com/example/logging/ListLogEntries.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.logging;
+
+// [START logging_list_log_entries]
+import com.google.api.gax.paging.Page;
+import com.google.cloud.logging.LogEntry;
+import com.google.cloud.logging.Logging;
+import com.google.cloud.logging.Logging.EntryListOption;
+import com.google.cloud.logging.LoggingOptions;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+
+public class ListLogEntries {
+
+ public static void main(String[] args) throws Exception {
+ // TODO(developer): Replace the variable value with valid log name before running the sample
+ // or provide it as an argument.
+ String logName = args.length > 0 ? args[0] : "test-log";
+
+ LoggingOptions options = LoggingOptions.getDefaultInstance();
+ Logging logging = options.getService();
+
+ // When composing a filter, using indexed fields, such as timestamp, resource.type, logName and
+ // others can help accelerate the results
+ // Full list of indexed fields here: https://cloud.google.com/logging/docs/view/advanced-queries#finding-quickly
+ // This sample restrict the results to only last hour to minimize number of API calls
+ Calendar calendar = Calendar.getInstance();
+ calendar.add(Calendar.HOUR, -1);
+ DateFormat rfc3339 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ String logFilter = "logName=projects/" + options.getProjectId() + "/logs/" + logName
+ + " AND timestamp>=\"" + rfc3339.format(calendar.getTime()) + "\"";
+
+ // List all log entries
+ Page entries = logging.listLogEntries(EntryListOption.filter(logFilter));
+ while (entries != null) {
+ for (LogEntry logEntry : entries.iterateAll()) {
+ System.out.println(logEntry);
+ }
+ entries = entries.getNextPage();
+ }
+ }
+}
+// [END logging_list_log_entries]
diff --git a/samples/snippets/src/main/java/com/example/logging/ListLogs.java b/samples/snippets/src/main/java/com/example/logging/ListLogs.java
index 349c2788d..666077ebd 100644
--- a/samples/snippets/src/main/java/com/example/logging/ListLogs.java
+++ b/samples/snippets/src/main/java/com/example/logging/ListLogs.java
@@ -16,47 +16,34 @@
package com.example.logging;
+// [START logging_list_logs]
import com.google.api.gax.paging.Page;
-import com.google.cloud.logging.LogEntry;
import com.google.cloud.logging.Logging;
-import com.google.cloud.logging.Logging.EntryListOption;
import com.google.cloud.logging.LoggingOptions;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-/** List logs programmatically using the Cloud Logging API. */
public class ListLogs {
- /** Expects an existing Cloud Logging log name as an argument. */
public static void main(String... args) throws Exception {
- // [START logging_list_log_entries]
- // Instantiates a client
- LoggingOptions options = LoggingOptions.getDefaultInstance();
- String logName = args[0];
-
- try (Logging logging = options.getService()) {
-
- // When composing a filter, using indexed fields, such as
- // timestamp, resource.type, logName and others can help accelerate the results
- // Full list of indexed fields here: https://cloud.google.com/logging/docs/view/advanced-queries#finding-quickly
- // Below we are restricting the results to only last hour to speedup getting the results back
- Calendar calendar = Calendar.getInstance();
- calendar.add(Calendar.HOUR, -1);
- DateFormat rfc3339 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
- String logFilter = "logName=projects/" + options.getProjectId() + "/logs/" + logName
- + " AND timestamp>=\"" + rfc3339.format(calendar.getTime()) + "\"";
-
- // List all log entries
- Page entries = logging.listLogEntries(EntryListOption.filter(logFilter));
- do {
- for (LogEntry logEntry : entries.iterateAll()) {
- System.out.println(logEntry);
- }
- entries = entries.getNextPage();
- } while (entries != null);
+ LoggingOptions options = LoggingOptions.getDefaultInstance();
+ Logging logging = options.getService();
+
+ // List all log names
+ Page logNames = logging.listLogs();
+ while (logNames != null) {
+ for (String logName : logNames.iterateAll()) {
+ System.out.println(logName);
+ }
+ logNames = logNames.getNextPage();
}
- // [END logging_list_log_entries]
}
}
+// [END logging_list_logs]
+
+// the following is a temporary location due to exclusive requirement
+// from snippet layout vs. snippet-bot
+
+// [START logging_list_log_entries]
+
+
+// [END logging_list_log_entries]
diff --git a/samples/snippets/src/main/java/com/example/logging/LogEntryWriteHttpRequest.java b/samples/snippets/src/main/java/com/example/logging/LogEntryWriteHttpRequest.java
index d17907d45..05e29a517 100644
--- a/samples/snippets/src/main/java/com/example/logging/LogEntryWriteHttpRequest.java
+++ b/samples/snippets/src/main/java/com/example/logging/LogEntryWriteHttpRequest.java
@@ -57,7 +57,7 @@ public static void createLogEntryRequest(String logName, String payLoad, HttpReq
// Writes the log entry asynchronously
logging.write(Collections.singleton(logEntry));
- System.out.printf("Logged: %s%n", payLoad);
+ System.out.printf("Logged: %s", payLoad);
}
}
}
diff --git a/samples/snippets/src/main/java/com/example/logging/QuickstartSample.java b/samples/snippets/src/main/java/com/example/logging/QuickstartSample.java
index 7ed408ed7..754c0bf41 100644
--- a/samples/snippets/src/main/java/com/example/logging/QuickstartSample.java
+++ b/samples/snippets/src/main/java/com/example/logging/QuickstartSample.java
@@ -26,8 +26,8 @@
import java.util.Collections;
/**
- * This sample demonstrates writing logs using the Cloud Logging API. The library also offers
- * a java.util.logging Handler `com.google.cloud.logging.LoggingHandler` Logback integration is also
+ * This sample demonstrates writing logs using the Cloud Logging API. The library also offers a
+ * java.util.logging Handler `com.google.cloud.logging.LoggingHandler` Logback integration is also
* available :
* https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback
* Using the java.util.logging handler / Logback appender should be preferred to using the API
diff --git a/samples/snippets/src/test/java/com/example/logging/LoggingIT.java b/samples/snippets/src/test/java/com/example/logging/LoggingIT.java
index 791f8c3b0..5bfc1e9b1 100644
--- a/samples/snippets/src/test/java/com/example/logging/LoggingIT.java
+++ b/samples/snippets/src/test/java/com/example/logging/LoggingIT.java
@@ -38,9 +38,10 @@
@SuppressWarnings("checkstyle:abbreviationaswordinname")
public class LoggingIT {
- private static final String QUICKSTART_LOG = "my-log";
- private static final String TEST_WRITE_LOG = "test-log";
- private static final String STRING_PAYLOAD = "Hello world!";
+ private static final String TEST_LOG = "test-log";
+ private static final String GOOGLEAPIS_AUDIT_LOGNAME = "cloudaudit.googleapis.com%2Factivity";
+ private static final String STRING_PAYLOAD = "Hello, world!";
+ private static final String STRING_PAYLOAD2 = "Hello world again";
private ByteArrayOutputStream bout;
private PrintStream out;
@@ -60,37 +61,38 @@ public void setUp() {
@After
public void tearDown() {
// Clean up created logs
- deleteLog(QUICKSTART_LOG);
- deleteLog(TEST_WRITE_LOG);
+ deleteLog(TEST_LOG);
System.setOut(null);
}
@Test
public void testQuickstart() throws Exception {
- QuickstartSample.main(QUICKSTART_LOG);
+ QuickstartSample.main(TEST_LOG);
String got = bout.toString();
- assertThat(got).contains("Logged: Hello, world!");
+ assertThat(got).contains(String.format("Logged: %s", STRING_PAYLOAD));
}
@Test(timeout = 60000)
public void testWriteAndListLogs() throws Exception {
// write a log entry
LogEntry entry =
- LogEntry.newBuilder(StringPayload.of("Hello world again"))
- .setLogName(TEST_WRITE_LOG)
+ LogEntry.newBuilder(StringPayload.of(STRING_PAYLOAD2))
+ .setLogName(TEST_LOG)
.setResource(MonitoredResource.newBuilder("global").build())
.build();
logging.write(Collections.singleton(entry));
// flush out log immediately
logging.flush();
bout.reset();
- // Check if the log is listed yet
+
+ // Check for mocked STDOUT having data
+ String[] args = new String[] {TEST_LOG};
while (bout.toString().isEmpty()) {
- ListLogs.main(TEST_WRITE_LOG);
+ ListLogEntries.main(args);
Thread.sleep(5000);
}
- assertThat(bout.toString().contains("Hello world again")).isTrue();
+ assertThat(bout.toString().contains(STRING_PAYLOAD2)).isTrue();
}
@Test(timeout = 60000)
@@ -101,15 +103,17 @@ public void testWriteLogHttpRequest() throws Exception {
.setRequestMethod(HttpRequest.RequestMethod.GET)
.setStatus(200)
.build();
- LogEntryWriteHttpRequest.createLogEntryRequest(TEST_WRITE_LOG, STRING_PAYLOAD, request);
+ LogEntryWriteHttpRequest.createLogEntryRequest(TEST_LOG, STRING_PAYLOAD, request);
String got = bout.toString();
// Check weather log entry is logged or not
assertThat(got).contains(String.format("Logged: %s", STRING_PAYLOAD));
bout.reset();
- // Check if the log is listed yet
+
+ // Check for mocked STDOUT having data
+ String[] args = new String[] {TEST_LOG};
while (bout.toString().isEmpty()) {
- ListLogs.main(TEST_WRITE_LOG);
+ ListLogEntries.main(args);
Thread.sleep(5000);
}
@@ -117,4 +121,15 @@ public void testWriteLogHttpRequest() throws Exception {
assertThat(bout.toString().contains(STRING_PAYLOAD)).isTrue();
assertThat(bout.toString().contains(request.toString())).isTrue();
}
+
+ @Test(timeout = 60000)
+ public void testListLogNames_shouldPass() throws Exception {
+ ListLogs.main();
+ // Check for mocked STDOUT having data
+ while (bout.toString().isEmpty()) {
+ Thread.sleep(5000);
+ }
+
+ assertThat(bout.toString().contains(GOOGLEAPIS_AUDIT_LOGNAME)).isTrue();
+ }
}
From 1b3ba0bce72ce7755d05e0632e7ca5a51f7a9975 Mon Sep 17 00:00:00 2001
From: minherz
Date: Thu, 12 Aug 2021 23:54:33 +0300
Subject: [PATCH 03/15] chore(doc): fix duplicated region tag (#622)
remove duplicated region tag logging_list_log_entries from ListLogs.java
---
.../src/main/java/com/example/logging/ListLogs.java | 8 --------
1 file changed, 8 deletions(-)
diff --git a/samples/snippets/src/main/java/com/example/logging/ListLogs.java b/samples/snippets/src/main/java/com/example/logging/ListLogs.java
index 666077ebd..5573c0717 100644
--- a/samples/snippets/src/main/java/com/example/logging/ListLogs.java
+++ b/samples/snippets/src/main/java/com/example/logging/ListLogs.java
@@ -39,11 +39,3 @@ public static void main(String... args) throws Exception {
}
}
// [END logging_list_logs]
-
-// the following is a temporary location due to exclusive requirement
-// from snippet layout vs. snippet-bot
-
-// [START logging_list_log_entries]
-
-
-// [END logging_list_log_entries]
From 738e7ad5beb23958719c5f429615d044a0d2e437 Mon Sep 17 00:00:00 2001
From: Yoshi Automation Bot
Date: Thu, 12 Aug 2021 14:04:18 -0700
Subject: [PATCH 04/15] chore: regenerate README (#623)
This PR was generated using Autosynth. :rainbow:
Log from Synthtool
```
2021-08-12 20:57:12,014 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-logging/.github/readme/synth.py.
On branch autosynth-readme
nothing to commit, working tree clean
2021-08-12 20:57:13,261 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata.
```
Full log will be available here:
https://source.cloud.google.com/results/invocations/65e6353c-f439-43d6-9c27-5d97c825dba2/targets
- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)
---
.github/readme/synth.metadata/synth.metadata | 4 ++--
README.md | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata
index 715ad35bd..da3f2171f 100644
--- a/.github/readme/synth.metadata/synth.metadata
+++ b/.github/readme/synth.metadata/synth.metadata
@@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-logging.git",
- "sha": "b0fd9dcc6a81d25d430ac4390568a3512a6b1005"
+ "sha": "1b3ba0bce72ce7755d05e0632e7ca5a51f7a9975"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
- "sha": "5605f38f153e7627ba4441a2c5181060b664d224"
+ "sha": "ff01716e16d2c6e87eaf87197b753ac9fcbbed5d"
}
}
]
diff --git a/README.md b/README.md
index ab502388f..ff2666fb6 100644
--- a/README.md
+++ b/README.md
@@ -57,13 +57,13 @@ compile 'com.google.cloud:google-cloud-logging'
If you are using Gradle without BOM, add this to your dependencies
```Groovy
-compile 'com.google.cloud:google-cloud-logging:3.0.0'
+compile 'com.google.cloud:google-cloud-logging:3.0.1'
```
If you are using SBT, add this to your dependencies
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "3.0.0"
+libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "3.0.1"
```
## Authentication
@@ -231,6 +231,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-logging/tree/
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Get Sink Metadata | [source code](https://github.com/googleapis/java-logging/blob/master/samples/snippets/src/main/java/com/example/logging/GetSinkMetadata.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/logging/GetSinkMetadata.java) |
+| List Log Entries | [source code](https://github.com/googleapis/java-logging/blob/master/samples/snippets/src/main/java/com/example/logging/ListLogEntries.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/logging/ListLogEntries.java) |
| List Logs | [source code](https://github.com/googleapis/java-logging/blob/master/samples/snippets/src/main/java/com/example/logging/ListLogs.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/logging/ListLogs.java) |
| Log Entry Write Http Request | [source code](https://github.com/googleapis/java-logging/blob/master/samples/snippets/src/main/java/com/example/logging/LogEntryWriteHttpRequest.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/logging/LogEntryWriteHttpRequest.java) |
| Quickstart Sample | [source code](https://github.com/googleapis/java-logging/blob/master/samples/snippets/src/main/java/com/example/logging/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-logging&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/logging/QuickstartSample.java) |
From bc3393f10ebba9834507c18ab9d281a232754250 Mon Sep 17 00:00:00 2001
From: Yoshi Automation Bot
Date: Thu, 12 Aug 2021 18:14:19 -0700
Subject: [PATCH 05/15] build(java): use ENABLE_FLAKYBOT env variable (#624)
Kokoro job config now supports both environment variables during this migration period.
Source-Author: Jeff Ching
Source-Date: Thu Aug 12 10:10:27 2021 -0700
Source-Repo: googleapis/synthtool
Source-Sha: ff01716e16d2c6e87eaf87197b753ac9fcbbed5d
Source-Link: https://github.com/googleapis/synthtool/commit/ff01716e16d2c6e87eaf87197b753ac9fcbbed5d
---
.kokoro/build.sh | 2 +-
.kokoro/nightly/integration.cfg | 2 +-
.kokoro/nightly/samples.cfg | 2 +-
synth.metadata | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.kokoro/build.sh b/.kokoro/build.sh
index 4d0c5bff6..521dfbb1c 100755
--- a/.kokoro/build.sh
+++ b/.kokoro/build.sh
@@ -115,7 +115,7 @@ fi
# fix output location of logs
bash .kokoro/coerce_logs.sh
-if [[ "${ENABLE_BUILD_COP}" == "true" ]]
+if [[ "${ENABLE_FLAKYBOT}" == "true" ]]
then
chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot
${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-logging
diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg
index 0048c8ece..e51c7b4c6 100644
--- a/.kokoro/nightly/integration.cfg
+++ b/.kokoro/nightly/integration.cfg
@@ -22,7 +22,7 @@ env_vars: {
}
env_vars: {
- key: "ENABLE_BUILD_COP"
+ key: "ENABLE_FLAKYBOT"
value: "true"
}
diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg
index f25429314..9761fd864 100644
--- a/.kokoro/nightly/samples.cfg
+++ b/.kokoro/nightly/samples.cfg
@@ -33,6 +33,6 @@ env_vars: {
}
env_vars: {
- key: "ENABLE_BUILD_COP"
+ key: "ENABLE_FLAKYBOT"
value: "true"
}
diff --git a/synth.metadata b/synth.metadata
index 41f28f6cf..137ba9ed8 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-logging.git",
- "sha": "99cb3a005f2775034d2df207dcb1a6c7f19b6fd4"
+ "sha": "738e7ad5beb23958719c5f429615d044a0d2e437"
}
},
{
@@ -19,7 +19,7 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
- "sha": "df7fc1e3a6df4316920ab221431945cdf9aa7217"
+ "sha": "ff01716e16d2c6e87eaf87197b753ac9fcbbed5d"
}
}
],
From 272737a74a25716d2036e20d902a089958160e1d Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Tue, 17 Aug 2021 16:56:24 +0200
Subject: [PATCH 06/15] chore(deps): update dependency
com.google.cloud:libraries-bom to v21 (#625)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | `20.9.0` -> `21.0.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Configuration
📅 **Schedule**: At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, check this box.
---
This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-logging).
---
samples/snippets/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 492811267..6bd45ffdf 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -29,7 +29,7 @@
com.google.cloud
libraries-bom
- 20.9.0
+ 21.0.0
pom
import
From 9d4daf7a7c15a56d4aef9895c082553ea17cae5f Mon Sep 17 00:00:00 2001
From: Yoshi Automation Bot
Date: Tue, 17 Aug 2021 08:06:35 -0700
Subject: [PATCH 07/15] chore: regenerate README (#626)
This PR was generated using Autosynth. :rainbow:
Log from Synthtool
```
2021-08-17 14:58:50,006 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-logging/.github/readme/synth.py.
On branch autosynth-readme
nothing to commit, working tree clean
2021-08-17 14:58:51,592 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata.
```
Full log will be available here:
https://source.cloud.google.com/results/invocations/4bc30d54-da84-4306-8f85-6ba25c9bedbd/targets
- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)
---
.github/readme/synth.metadata/synth.metadata | 4 ++--
README.md | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata
index da3f2171f..526137f01 100644
--- a/.github/readme/synth.metadata/synth.metadata
+++ b/.github/readme/synth.metadata/synth.metadata
@@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-logging.git",
- "sha": "1b3ba0bce72ce7755d05e0632e7ca5a51f7a9975"
+ "sha": "272737a74a25716d2036e20d902a089958160e1d"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
- "sha": "ff01716e16d2c6e87eaf87197b753ac9fcbbed5d"
+ "sha": "a01e1a0bf70754f51450958b966bd673945d1e6e"
}
}
]
diff --git a/README.md b/README.md
index ff2666fb6..5bf5a3a57 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
com.google.cloud
libraries-bom
- 20.9.0
+ 21.0.0
pom
import
@@ -50,7 +50,7 @@ If you are using Maven without BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies
```Groovy
-implementation platform('com.google.cloud:libraries-bom:20.9.0')
+implementation platform('com.google.cloud:libraries-bom:21.0.0')
compile 'com.google.cloud:google-cloud-logging'
```
From e27b0b0b12c5aaa170910ecc34357d7a3e1be9a6 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Tue, 17 Aug 2021 23:36:26 +0200
Subject: [PATCH 08/15] chore(deps): update dependency
com.google.cloud:google-cloud-logging to v3.0.1 (#619)
---
samples/install-without-bom/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 0bb8f57da..392af2c37 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-logging
- 3.0.0
+ 3.0.1
From f7d195378741dc46364bbb813a120ebee56d29d2 Mon Sep 17 00:00:00 2001
From: Yoshi Automation Bot
Date: Tue, 17 Aug 2021 14:46:27 -0700
Subject: [PATCH 09/15] chore: regenerate README (#629)
This PR was generated using Autosynth. :rainbow:
Log from Synthtool
```
2021-08-17 21:38:37,343 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-logging/.github/readme/synth.py.
On branch autosynth-readme
nothing to commit, working tree clean
2021-08-17 21:38:38,293 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata.
```
Full log will be available here:
https://source.cloud.google.com/results/invocations/42193665-ba25-42f5-9864-55657a32a796/targets
- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)
---
.github/readme/synth.metadata/synth.metadata | 4 ++--
README.md | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata
index 526137f01..83d837f90 100644
--- a/.github/readme/synth.metadata/synth.metadata
+++ b/.github/readme/synth.metadata/synth.metadata
@@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-logging.git",
- "sha": "272737a74a25716d2036e20d902a089958160e1d"
+ "sha": "e27b0b0b12c5aaa170910ecc34357d7a3e1be9a6"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
- "sha": "a01e1a0bf70754f51450958b966bd673945d1e6e"
+ "sha": "484b7ec7bdef3909589a83e3d763e7588cb8c37c"
}
}
]
diff --git a/README.md b/README.md
index 5bf5a3a57..687b9d9ea 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ If you are using Maven without BOM, add this to your dependencies:
com.google.cloud
google-cloud-logging
- 3.0.0
+ 3.0.1
```
From 7c239bb1cad1db847e1b0e986cd70920f30bb3ff Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Thu, 19 Aug 2021 21:52:25 +0200
Subject: [PATCH 10/15] build(deps): update dependency
com.google.cloud:google-cloud-shared-config to v1.0.1 (#631)
---
google-cloud-logging-bom/pom.xml | 2 +-
pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/google-cloud-logging-bom/pom.xml b/google-cloud-logging-bom/pom.xml
index 852d3fbad..597cf5143 100644
--- a/google-cloud-logging-bom/pom.xml
+++ b/google-cloud-logging-bom/pom.xml
@@ -8,7 +8,7 @@
com.google.cloud
google-cloud-shared-config
- 1.0.0
+ 1.0.1
Google Cloud logging BOM
diff --git a/pom.xml b/pom.xml
index 71eed2728..80c7bde62 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
com.google.cloud
google-cloud-shared-config
- 1.0.0
+ 1.0.1
From 6b3ee2cf2db8bdca6262bd7bd60c0ba1df9e1c32 Mon Sep 17 00:00:00 2001
From: Ace Nassri
Date: Fri, 20 Aug 2021 21:57:19 -0700
Subject: [PATCH 11/15] chore(README): update package name (#634)
Replaces #633
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 687b9d9ea..a68e8d481 100644
--- a/README.md
+++ b/README.md
@@ -172,7 +172,7 @@ With Logging you can also list log entries that have been previously written. Ad
imports at the top of your file:
```java
-import com.google.cloud.Page;
+import com.google.api.gax.paging.Page;
import com.google.cloud.logging.LogEntry;
import com.google.cloud.logging.Logging.EntryListOption;
```
From cc394a2bc986ad9ede73833c7417025b8551f202 Mon Sep 17 00:00:00 2001
From: Yoshi Automation Bot
Date: Fri, 20 Aug 2021 22:08:23 -0700
Subject: [PATCH 12/15] chore: regenerate README (#635)
This PR was generated using Autosynth. :rainbow:
Log from Synthtool
```
2021-08-21 04:59:24,120 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-logging/.github/readme/synth.py.
On branch autosynth-readme
nothing to commit, working tree clean
2021-08-21 04:59:25,182 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata.
```
Full log will be available here:
https://source.cloud.google.com/results/invocations/831b031d-ecf5-43d6-b454-03aa60349616/targets
- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)
---
.github/readme/synth.metadata/synth.metadata | 2 +-
README.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata
index 83d837f90..d44221887 100644
--- a/.github/readme/synth.metadata/synth.metadata
+++ b/.github/readme/synth.metadata/synth.metadata
@@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-logging.git",
- "sha": "e27b0b0b12c5aaa170910ecc34357d7a3e1be9a6"
+ "sha": "6b3ee2cf2db8bdca6262bd7bd60c0ba1df9e1c32"
}
},
{
diff --git a/README.md b/README.md
index a68e8d481..687b9d9ea 100644
--- a/README.md
+++ b/README.md
@@ -172,7 +172,7 @@ With Logging you can also list log entries that have been previously written. Ad
imports at the top of your file:
```java
-import com.google.api.gax.paging.Page;
+import com.google.cloud.Page;
import com.google.cloud.logging.LogEntry;
import com.google.cloud.logging.Logging.EntryListOption;
```
From fb9ac954293f5a281024e122d06e8487cb3a62c1 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Mon, 23 Aug 2021 22:50:22 +0200
Subject: [PATCH 13/15] deps: update dependency
com.google.cloud:google-cloud-shared-dependencies to v2.1.0 (#636)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.0.1` -> `2.1.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/java-shared-dependencies
### [`v2.1.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#210-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare201v210-2021-08-23)
[Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.0.1...v2.1.0)
##### Dependencies
- update dependency com.google.auth:google-auth-library-bom to v1.1.0 ([#439](https://www.togithub.com/googleapis/java-shared-dependencies/issues/439)) ([ca52bd9](https://www.github.com/googleapis/java-shared-dependencies/commit/ca52bd9c099c96bf7b5a57aa85d39b58a610c875))
- update dependency com.google.cloud:google-cloud-core-bom to v2.1.0 ([#444](https://www.togithub.com/googleapis/java-shared-dependencies/issues/444)) ([ff914c6](https://www.github.com/googleapis/java-shared-dependencies/commit/ff914c6de9e3e7fa6ba75591d3d5077c5421827d))
- update dependency com.google.code.gson:gson to v2.8.8 ([#442](https://www.togithub.com/googleapis/java-shared-dependencies/issues/442)) ([79a093f](https://www.github.com/googleapis/java-shared-dependencies/commit/79a093f9ccea4d47cf8b678570a1c9699029a8b2))
- update dependency com.google.errorprone:error_prone_annotations to v2.9.0 ([#441](https://www.togithub.com/googleapis/java-shared-dependencies/issues/441)) ([e644a4b](https://www.github.com/googleapis/java-shared-dependencies/commit/e644a4b504ab8aa5771f9be36861d1730ea9bcc9))
- update dependency io.grpc:grpc-bom to v1.40.0 ([#438](https://www.togithub.com/googleapis/java-shared-dependencies/issues/438)) ([c3f8fb4](https://www.github.com/googleapis/java-shared-dependencies/commit/c3f8fb4408f5dc6c7f7dc0e14f0c24fa755433a5))
- update gax.version to v2.3.0 ([#437](https://www.togithub.com/googleapis/java-shared-dependencies/issues/437)) ([e59aaad](https://www.github.com/googleapis/java-shared-dependencies/commit/e59aaadd76e40ab5ea31c3e812686a4ba0471a49))
##### [2.0.1](https://www.github.com/googleapis/java-shared-dependencies/compare/2.0.0...v2.0.1) (2021-08-11)
##### Dependencies
- update dependency com.google.api:api-common to v2.0.1 ([#431](https://www.togithub.com/googleapis/java-shared-dependencies/issues/431)) ([b1a52c8](https://www.github.com/googleapis/java-shared-dependencies/commit/b1a52c83e19be7be80086f2010e928171b046f62))
- update gax.version to v2.1.0 ([#432](https://www.togithub.com/googleapis/java-shared-dependencies/issues/432)) ([7f53006](https://www.github.com/googleapis/java-shared-dependencies/commit/7f53006d021e839f52325a87d7c4715eff88818d))
- update google.core.version to v2.0.4 ([#430](https://www.togithub.com/googleapis/java-shared-dependencies/issues/430)) ([d0465ad](https://www.github.com/googleapis/java-shared-dependencies/commit/d0465ad3a79993d4e854078ea992e53ab9add07f))
- update google.core.version to v2.0.5 ([#434](https://www.togithub.com/googleapis/java-shared-dependencies/issues/434)) ([af00753](https://www.github.com/googleapis/java-shared-dependencies/commit/af0075390034cba5cefede8260ab03f728d525a8))
---
### Configuration
📅 **Schedule**: At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, check this box.
---
This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-logging).
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 80c7bde62..1f2d3bc89 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,7 @@
com.google.cloud
google-cloud-shared-dependencies
- 2.0.1
+ 2.1.0
pom
import
From 454f52867f7ad765a2144cbdcbd513ba3d61f8f8 Mon Sep 17 00:00:00 2001
From: Tomo Suzuki
Date: Tue, 24 Aug 2021 14:32:39 -0400
Subject: [PATCH 14/15] ci: removing linkage-monitor from the required checks
(#637)
Linkage Monitor is no longer needed, because the Libraries BOM synchronizes with Google Cloud BOM and the shared dependencies BOM https://github.com/GoogleCloudPlatform/cloud-opensource-java/issues/2137
---
.github/sync-repo-settings.yaml | 2 --
1 file changed, 2 deletions(-)
diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml
index 901bfdd74..3755e61c6 100644
--- a/.github/sync-repo-settings.yaml
+++ b/.github/sync-repo-settings.yaml
@@ -10,7 +10,6 @@ branchProtectionRules:
requiredStatusCheckContexts:
- dependencies (8)
- dependencies (11)
- - linkage-monitor
- lint
- clirr
- units (8)
@@ -25,7 +24,6 @@ branchProtectionRules:
requiredStatusCheckContexts:
- dependencies (8)
- dependencies (11)
- - linkage-monitor
- lint
- clirr
- units (8)
From ed9a9f3bcfa1098f4120a8ea3eace9f3cfa64eb0 Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Tue, 24 Aug 2021 23:28:46 +0000
Subject: [PATCH 15/15] chore: release 3.1.0 (#620)
:robot: I have created a release \*beep\* \*boop\*
---
## [3.1.0](https://www.github.com/googleapis/java-logging/compare/v3.0.1...v3.1.0) (2021-08-24)
### Features
* implement listLogs API and provide sample snippet ([#602](https://www.github.com/googleapis/java-logging/issues/602)) ([9359569](https://www.github.com/googleapis/java-logging/commit/935956944200d978738d86ae4adff6107532531c))
### Dependencies
* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.1.0 ([#636](https://www.github.com/googleapis/java-logging/issues/636)) ([fb9ac95](https://www.github.com/googleapis/java-logging/commit/fb9ac954293f5a281024e122d06e8487cb3a62c1))
---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
---
CHANGELOG.md | 12 ++++++++++++
google-cloud-logging-bom/pom.xml | 8 ++++----
google-cloud-logging/pom.xml | 4 ++--
grpc-google-cloud-logging-v2/pom.xml | 4 ++--
pom.xml | 8 ++++----
proto-google-cloud-logging-v2/pom.xml | 4 ++--
samples/snapshot/pom.xml | 2 +-
versions.txt | 6 +++---
8 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9b8546de..af3c3263b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Changelog
+## [3.1.0](https://www.github.com/googleapis/java-logging/compare/v3.0.1...v3.1.0) (2021-08-24)
+
+
+### Features
+
+* implement listLogs API and provide sample snippet ([#602](https://www.github.com/googleapis/java-logging/issues/602)) ([9359569](https://www.github.com/googleapis/java-logging/commit/935956944200d978738d86ae4adff6107532531c))
+
+
+### Dependencies
+
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.1.0 ([#636](https://www.github.com/googleapis/java-logging/issues/636)) ([fb9ac95](https://www.github.com/googleapis/java-logging/commit/fb9ac954293f5a281024e122d06e8487cb3a62c1))
+
### [3.0.1](https://www.github.com/googleapis/java-logging/compare/v3.0.0...v3.0.1) (2021-08-11)
diff --git a/google-cloud-logging-bom/pom.xml b/google-cloud-logging-bom/pom.xml
index 597cf5143..1547f277e 100644
--- a/google-cloud-logging-bom/pom.xml
+++ b/google-cloud-logging-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-logging-bom
- 3.0.2-SNAPSHOT
+ 3.1.0
pom
com.google.cloud
@@ -54,17 +54,17 @@
com.google.api.grpc
proto-google-cloud-logging-v2
- 0.89.2-SNAPSHOT
+ 0.90.0
com.google.api.grpc
grpc-google-cloud-logging-v2
- 0.89.2-SNAPSHOT
+ 0.90.0
com.google.cloud
google-cloud-logging
- 3.0.2-SNAPSHOT
+ 3.1.0