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