From 579e63c25a837bc62025c2529a2401d4f04fcd2a Mon Sep 17 00:00:00 2001 From: cindy-peng Date: Wed, 17 Jan 2024 09:11:13 -0800 Subject: [PATCH] fix: enable v2.LogEntry Protobufs converter --- .../src/main/java/com/google/cloud/logging/LogEntry.java | 4 ++-- 1 file changed, 2 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..0a898acaa 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,7 @@ 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); };