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

Dieser Commit ist enthalten in:
powercas_gamer 2023-06-25 09:57:45 +02:00 committet von GitHub
Ursprung b34d4ecd2e
Commit e8bec64217
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -754,7 +754,7 @@ index 0000000000000000000000000000000000000000..3327595d154700890c862a2ced5eff93
+} +}
diff --git a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java diff --git a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..e3e902a708a760be167cb1bba8e845c5fa5b9141 index 0000000000000000000000000000000000000000..9af07d168beadaa77e4965819200eeb94fe3e092
--- /dev/null --- /dev/null
+++ b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java +++ b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java
@@ -0,0 +1,132 @@ @@ -0,0 +1,132 @@
@ -784,12 +784,12 @@ index 0000000000000000000000000000000000000000..e3e902a708a760be167cb1bba8e845c5
+import org.eclipse.aether.transfer.TransferEvent; +import org.eclipse.aether.transfer.TransferEvent;
+import org.eclipse.aether.transport.http.HttpTransporterFactory; +import org.eclipse.aether.transport.http.HttpTransporterFactory;
+import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.NotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+ +
+import java.io.File; +import java.io.File;
+import java.util.ArrayList; +import java.util.ArrayList;
+import java.util.List; +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 + * 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..e3e902a708a760be167cb1bba8e845c5
+ */ + */
+public class MavenLibraryResolver implements ClassPathLibrary { +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 RepositorySystem repository;
+ private final DefaultRepositorySystemSession session; + private final DefaultRepositorySystemSession session;
@ -838,7 +838,7 @@ index 0000000000000000000000000000000000000000..e3e902a708a760be167cb1bba8e845c5
+ this.session.setTransferListener(new AbstractTransferListener() { + this.session.setTransferListener(new AbstractTransferListener() {
+ @Override + @Override
+ public void transferInitiated(@NotNull TransferEvent event) throws TransferCancelledException { + 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(); + this.session.setReadOnly();