diff --git a/CHANGELOG.md b/CHANGELOG.md index 463a733a3..d1e2ad6ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog +## [0.128.9](https://github.com/googleapis/java-logging-logback/compare/v0.128.8...v0.128.9) (2023-01-05) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-logging to v3.14.0 ([#968](https://github.com/googleapis/java-logging-logback/issues/968)) ([6d41f9a](https://github.com/googleapis/java-logging-logback/commit/6d41f9a3e274d78a9dfdc458feff9644206ee6b9)) + ## [0.128.8](https://github.com/googleapis/java-logging-logback/compare/v0.128.7...v0.128.8) (2022-12-31) diff --git a/README.md b/README.md index da81efaa8..d3eea20b3 100644 --- a/README.md +++ b/README.md @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-logging-logback - 0.129.7-alpha + 0.129.8-alpha ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-logging-logback:0.129.7-alpha' +implementation 'com.google.cloud:google-cloud-logging-logback:0.129.8-alpha' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-logging-logback" % "0.129.7-alpha" +libraryDependencies += "com.google.cloud" % "google-cloud-logging-logback" % "0.129.8-alpha" ``` ## Authentication diff --git a/pom.xml b/pom.xml index 7af8e6086..2a42f5aa7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 google-cloud-logging-logback - 0.129.8-alpha + 0.129.9-alpha jar Google Cloud Logging Logback Appender https://github.com/googleapis/java-logging-logback @@ -17,7 +17,7 @@ 1.2.11 5.1.0 1.1.3 - 3.13.7 + 3.14.0 1.7.36 1.10.1 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index f6448b80f..1d8b23173 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-logging-logback - 0.129.8-alpha + 0.129.9-alpha diff --git a/src/main/java/com/google/cloud/logging/logback/LoggingAppender.java b/src/main/java/com/google/cloud/logging/logback/LoggingAppender.java index 2aa712042..60fc0578b 100644 --- a/src/main/java/com/google/cloud/logging/logback/LoggingAppender.java +++ b/src/main/java/com/google/cloud/logging/logback/LoggingAppender.java @@ -102,16 +102,16 @@ public class LoggingAppender extends UnsynchronizedAppenderBase { private static final String TYPE = "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent"; private static final List DEFAULT_LOGGING_EVENT_ENHANCERS = - ImmutableList.of(new MDCEventEnhancer()); + ImmutableList.of(new MDCEventEnhancer()); public static final String JAVA_LOGBACK_LIBRARY_NAME = "java-logback"; // Using release-please annotations to update DEFAULT_INSTRUMENTATION_VERSION with latest version. // See // https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files // {x-version-update-start:google-cloud-logging-logback:current} - public static final String DEFAULT_INSTRUMENTATION_VERSION = "0.129.8-alpha"; + public static final String DEFAULT_INSTRUMENTATION_VERSION = "0.129.9-alpha"; // {x-version-update-end} private static boolean instrumentationAdded = false; - private static Object instrumentationLock = new Object(); + private static final Object instrumentationLock = new Object(); private volatile Logging logging; private LoggingOptions loggingOptions; @@ -158,7 +158,7 @@ public void setLog(String log) { * Sets the name of the monitored resource (Optional). If not define the appender will try to * identify the resource type automatically. Currently support resource types include "gae_app", * "gce_instance", "k8s_container", "cloud_run_revision" and "cloud_function". If the appender - * fails to identify the resource type it will be set to "global". + * fails to identify the resource type, it will be set to "global". * *

Must be a one of the supported resource types. @@ -248,7 +248,7 @@ public void addLoggingEventEnhancer(String enhancerClassName) { /** * Returns the current value of the ingestion mode. * - *

The method is deprecated. Use appender configuration to setup the ingestion + *

The method is deprecated. Use appender configuration to set up the ingestion * * @return a {@link Synchronicity} value of the ingestion module. */ @@ -344,7 +344,7 @@ String getProjectId() { @Override protected void append(ILoggingEvent e) { - List entriesList = new ArrayList(); + List entriesList = new ArrayList<>(); entriesList.add(logEntryFor(e)); // Check if instrumentation was already added - if not, create a log entry with instrumentation // data @@ -531,7 +531,7 @@ private static Severity severityFor(Level level) { * The package-private helper method used to set the flag which indicates if instrumentation info * already written or not. * - * @returns The value of the flag before it was set. + * @return The value of the flag before it was set. */ static boolean setInstrumentationStatus(boolean value) { if (instrumentationAdded == value) return instrumentationAdded; diff --git a/src/main/java/com/google/cloud/logging/logback/MDCEventEnhancer.java b/src/main/java/com/google/cloud/logging/logback/MDCEventEnhancer.java index ae52a286a..3a0c0009e 100644 --- a/src/main/java/com/google/cloud/logging/logback/MDCEventEnhancer.java +++ b/src/main/java/com/google/cloud/logging/logback/MDCEventEnhancer.java @@ -30,7 +30,7 @@ final class MDCEventEnhancer implements LoggingEventEnhancer { @Override - public final void enhanceLogEntry(LogEntry.Builder builder, ILoggingEvent e) { + public void enhanceLogEntry(LogEntry.Builder builder, ILoggingEvent e) { for (Map.Entry entry : e.getMDCPropertyMap().entrySet()) { if (null != entry.getKey() && null != entry.getValue()) { builder.addLabel(entry.getKey(), entry.getValue()); diff --git a/src/test/java/com/google/cloud/logging/logback/LoggingAppenderTest.java b/src/test/java/com/google/cloud/logging/logback/LoggingAppenderTest.java index ac97cbc3f..6cd59f575 100644 --- a/src/test/java/com/google/cloud/logging/logback/LoggingAppenderTest.java +++ b/src/test/java/com/google/cloud/logging/logback/LoggingAppenderTest.java @@ -63,9 +63,9 @@ public class LoggingAppenderTest { private static final String OVERRIDED_PROJECT_ID = "some-project-id"; private static final String DUMMY_CRED_FILE_PATH = "src/test/java/com/google/cloud/logging/logback/dummy-credentials.json"; - private static Payload.JsonPayload JSON_PAYLOAD = + private static final Payload.JsonPayload JSON_PAYLOAD = Payload.JsonPayload.of(ImmutableMap.of("message", "this is a test")); - private static Payload.JsonPayload JSON_ERROR_PAYLOAD = + private static final Payload.JsonPayload JSON_ERROR_PAYLOAD = Payload.JsonPayload.of( ImmutableMap.of( "message", diff --git a/versions.txt b/versions.txt index 97a858bc8..223efff40 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-cloud-logging-logback:0.129.8-alpha:0.129.8-alpha +google-cloud-logging-logback:0.129.9-alpha:0.129.9-alpha