From 74fb11516e382baab2ed9a475b67b3b057bc1f5d Mon Sep 17 00:00:00 2001 From: Ben Creech Date: Sat, 30 Jul 2022 22:50:52 +0000 Subject: [PATCH 1/2] feat: Make LoggingHandler.logEntryFor extensible --- .../main/java/com/google/cloud/logging/LoggingHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java index ffa4c6273..189c1e50d 100644 --- a/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java +++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java @@ -305,7 +305,7 @@ public void publish(LogRecord record) { } LogEntry logEntry; try { - logEntry = logEntryFor(record); + logEntry = logEntryFor(record).build(); } catch (Exception ex) { getErrorManager().error(null, ex, ErrorManager.FORMAT_FAILURE); return; @@ -343,7 +343,7 @@ private MonitoredResource getMonitoredResource() { return null; } - private LogEntry logEntryFor(LogRecord record) throws Exception { + protected LogEntry.Builder logEntryFor(LogRecord record) throws Exception { String payload = getFormatter().format(record); Level level = record.getLevel(); LogEntry.Builder builder = @@ -360,7 +360,7 @@ private LogEntry logEntryFor(LogRecord record) throws Exception { for (LoggingEnhancer enhancer : enhancers) { enhancer.enhanceLogEntry(builder); } - return builder.build(); + return builder; } @Override From 278edd0b2e9280a45e63ccdfb07f40f47d136eb4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 19 Aug 2022 01:56:28 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 650d44e1c..8c185bca1 100644 --- a/README.md +++ b/README.md @@ -51,20 +51,20 @@ 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:26.0.0') +implementation platform('com.google.cloud:libraries-bom:26.1.0') implementation 'com.google.cloud:google-cloud-logging' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-logging:3.10.0' +implementation 'com.google.cloud:google-cloud-logging:3.10.2' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "3.10.0" +libraryDependencies += "com.google.cloud" % "google-cloud-logging" % "3.10.2" ``` ## Authentication