From 9ef4d9048b1ecdc887ebc9cb4898a4bfe3f6c154 Mon Sep 17 00:00:00 2001 From: Cindy Peng <148148319+cindy-peng@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:47:26 -0800 Subject: [PATCH] fix: enable v2.LogEntry Protobufs converter functions (#1509) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: enable v2.LogEntry Protobufs converter * fix formatting * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: cindy-peng Co-authored-by: Owl Bot --- .../src/main/java/com/google/cloud/logging/LogEntry.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java index 72622031d..2fd872f09 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java @@ -760,7 +760,7 @@ public static LogEntry of(String logName, MonitoredResource resource, Payload return newBuilder(payload).setLogName(logName).setResource(resource).build(); } - static LogEntry fromPb(com.google.logging.v2.LogEntry entryPb) { + public static LogEntry fromPb(com.google.logging.v2.LogEntry entryPb) { Builder builder = newBuilder(Payload.fromPb(entryPb)); builder.setLabels(entryPb.getLabelsMap()); builder.setSeverity(Severity.fromPb(entryPb.getSeverity())); @@ -805,7 +805,8 @@ static LogEntry fromPb(com.google.logging.v2.LogEntry entryPb) { return builder.build(); } - static Function toPbFunction(final String projectId) { + public static Function toPbFunction( + final String projectId) { return (LogEntry entry) -> { return entry.toPb(projectId); };