Fix ugly java logger format for paper plugin dependency loader (#9395)

This commit is contained in:
powercas_gamer 2023-06-25 09:57:45 +02:00
parent ec0be3fbf2
commit 9696b46122

View File

@ -784,12 +784,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.eclipse.aether.transfer.TransferEvent;
+import org.eclipse.aether.transport.http.HttpTransporterFactory;
+import org.jetbrains.annotations.NotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * The maven library resolver acts as a resolver for yet to be resolved jar libraries that may be pulled from a
@ -810,7 +810,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+public class MavenLibraryResolver implements ClassPathLibrary {
+
+ private static final Logger logger = Logger.getLogger("MavenLibraryResolver");
+ private static final Logger logger = LoggerFactory.getLogger("MavenLibraryResolver");
+
+ private final RepositorySystem repository;
+ private final DefaultRepositorySystemSession session;
@ -838,7 +838,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.session.setTransferListener(new AbstractTransferListener() {
+ @Override
+ public void transferInitiated(@NotNull TransferEvent event) throws TransferCancelledException {
+ logger.log(Level.INFO, "Downloading {0}", event.getResource().getRepositoryUrl() + event.getResource().getResourceName());
+ logger.info("Downloading {}", event.getResource().getRepositoryUrl() + event.getResource().getResourceName());
+ }
+ });
+ this.session.setReadOnly();