diff --git a/gradle-consistent-versions-idea-plugin/build.gradle b/gradle-consistent-versions-idea-plugin/build.gradle index 2268187..5173e49 100644 --- a/gradle-consistent-versions-idea-plugin/build.gradle +++ b/gradle-consistent-versions-idea-plugin/build.gradle @@ -29,6 +29,7 @@ dependencies { compileOnly 'org.immutables:value::annotations' testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.assertj:assertj-core' + implementation 'com.palantir.safe-logging:logger' } grammarKit { diff --git a/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/ContentsUtil.java b/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/ContentsUtil.java index 4037092..0bb5a25 100644 --- a/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/ContentsUtil.java +++ b/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/ContentsUtil.java @@ -20,6 +20,8 @@ import com.intellij.openapi.progress.ProcessCanceledException; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressManager; +import com.palantir.logsafe.logger.SafeLogger; +import com.palantir.logsafe.logger.SafeLoggerFactory; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; @@ -32,7 +34,7 @@ import org.slf4j.LoggerFactory; public final class ContentsUtil { - private static final Logger log = LoggerFactory.getLogger(ContentsUtil.class); + private static final SafeLogger log = SafeLoggerFactory.get(ContentsUtil.class); private ContentsUtil() { // Utility class; prevent instantiation diff --git a/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/RepositoryExplorer.java b/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/RepositoryExplorer.java index d71f4e5..c0ccda1 100644 --- a/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/RepositoryExplorer.java +++ b/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/RepositoryExplorer.java @@ -17,6 +17,8 @@ package com.palantir.gradle.versions.intellij; import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import com.palantir.logsafe.logger.SafeLogger; +import com.palantir.logsafe.logger.SafeLoggerFactory; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; @@ -30,7 +32,7 @@ import org.slf4j.LoggerFactory; public class RepositoryExplorer { - private static final Logger log = LoggerFactory.getLogger(RepositoryExplorer.class); + private static final SafeLogger log = SafeLoggerFactory.get(RepositoryExplorer.class); private final String baseUrl; diff --git a/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/VersionCompletionContributor.java b/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/VersionCompletionContributor.java index 10b481a..6f54339 100644 --- a/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/VersionCompletionContributor.java +++ b/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/VersionCompletionContributor.java @@ -28,13 +28,15 @@ import com.palantir.gradle.versions.intellij.psi.VersionPropsDependencyVersion; import com.palantir.gradle.versions.intellij.psi.VersionPropsProperty; import com.palantir.gradle.versions.intellij.psi.VersionPropsTypes; +import com.palantir.logsafe.logger.SafeLogger; +import com.palantir.logsafe.logger.SafeLoggerFactory; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class VersionCompletionContributor extends CompletionContributor { - private static final Logger log = LoggerFactory.getLogger(VersionCompletionContributor.class); + private static final SafeLogger log = SafeLoggerFactory.get(VersionCompletionContributor.class); VersionCompletionContributor() { extend(