Skip to content

Commit

Permalink
Excavator: Migrate to the logsafe SafeLogger API
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot committed Nov 4, 2024
1 parent aba4e0a commit 09067fc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions gradle-consistent-versions-idea-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import com.intellij.openapi.externalSystem.model.task.ExternalSystemTaskNotificationEvent;
import com.intellij.openapi.externalSystem.model.task.ExternalSystemTaskNotificationListener;
import com.intellij.openapi.externalSystem.model.task.ExternalSystemTaskType;
import com.palantir.logsafe.logger.SafeLogger;
import com.palantir.logsafe.logger.SafeLoggerFactory;
import org.jetbrains.plugins.gradle.util.GradleConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LoadCacheOnGradleProjectRefresh implements ExternalSystemTaskNotificationListener {
private static final Logger log = LoggerFactory.getLogger(LoadCacheOnGradleProjectRefresh.class);
private static final SafeLogger log = SafeLoggerFactory.get(LoadCacheOnGradleProjectRefresh.class);

@Override
public final void onSuccess(ExternalSystemTaskId id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import com.github.benmanes.caffeine.cache.Caffeine;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Lists;
import com.palantir.logsafe.logger.SafeLogger;
import com.palantir.logsafe.logger.SafeLoggerFactory;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
Expand All @@ -39,11 +41,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 static final Pattern UNSTABLE_VERSION_PATTERN = Pattern.compile(
".*(-rc(-?\\d+)?|-SNAPSHOT|-M\\d+|-alpha(-?\\d+)?|-beta(-?\\d+)?)$", Pattern.CASE_INSENSITIVE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.datatype.guava.GuavaModule;
import com.intellij.openapi.project.Project;
import com.palantir.logsafe.logger.SafeLogger;
import com.palantir.logsafe.logger.SafeLoggerFactory;
import java.io.File;
import java.io.IOException;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.immutables.value.Value;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class RepositoryLoader {
private static final Logger log = LoggerFactory.getLogger(RepositoryLoader.class);
private static final SafeLogger log = SafeLoggerFactory.get(RepositoryLoader.class);

private static final ObjectMapper XML_MAPPER = new XmlMapper().registerModule(new GuavaModule());
private static final String MAVEN_REPOSITORIES_FILE_NAME = ".idea/gcv-maven-repositories.xml";
Expand Down

0 comments on commit 09067fc

Please sign in to comment.