diff --git a/gradle-consistent-versions-idea-plugin/build.gradle b/gradle-consistent-versions-idea-plugin/build.gradle index 916cd87..9da42c2 100644 --- a/gradle-consistent-versions-idea-plugin/build.gradle +++ b/gradle-consistent-versions-idea-plugin/build.gradle @@ -30,6 +30,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..b09d338 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; @@ -28,11 +30,9 @@ import java.util.Optional; import java.util.concurrent.Callable; import java.util.concurrent.Future; -import org.slf4j.Logger; -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/GradleCacheExplorer.java b/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/GradleCacheExplorer.java index 4b6fb0e..3c6a4b2 100644 --- a/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/GradleCacheExplorer.java +++ b/gradle-consistent-versions-idea-plugin/src/main/java/com/palantir/gradle/versions/intellij/GradleCacheExplorer.java @@ -22,6 +22,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.BufferedInputStream; import java.io.IOException; import java.nio.file.Files; @@ -37,12 +39,10 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class GradleCacheExplorer { - private static final Logger log = LoggerFactory.getLogger(GradleCacheExplorer.class); + private static final SafeLogger log = SafeLoggerFactory.get(GradleCacheExplorer.class); private static final String GRADLE_CACHE_PATH = System.getProperty("user.home") + "/.gradle/caches/modules-2/"; private final Cache> cache = Caffeine.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES).build(); 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 9efb8bb..c4990c8 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 @@ -19,6 +19,8 @@ import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; +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,11 +32,9 @@ import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; -import org.slf4j.Logger; -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; private static final Cache> folderCache = Caffeine.newBuilder() 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 ae1b328..14813a2 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 @@ -30,13 +30,13 @@ 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(