mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Merge pull request #459 from Project-Cepi/log-class-loader-finalization
Use proper logging to log class loader finalization
This commit is contained in:
commit
561a10bddc
@ -1,5 +1,8 @@
|
|||||||
package net.minestom.server.extras.selfmodification;
|
package net.minestom.server.extras.selfmodification;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
@ -15,6 +18,8 @@ public class MinestomExtensionClassLoader extends HierarchyClassLoader {
|
|||||||
*/
|
*/
|
||||||
private final String mainClassName;
|
private final String mainClassName;
|
||||||
|
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(MinestomExtensionClassLoader.class);
|
||||||
|
|
||||||
public MinestomExtensionClassLoader(String extensionName, String mainClassName, URL[] urls, MinestomRootClassLoader root) {
|
public MinestomExtensionClassLoader(String extensionName, String mainClassName, URL[] urls, MinestomRootClassLoader root) {
|
||||||
super(extensionName, urls, root);
|
super(extensionName, urls, root);
|
||||||
this.root = root;
|
this.root = root;
|
||||||
@ -95,7 +100,7 @@ public class MinestomExtensionClassLoader extends HierarchyClassLoader {
|
|||||||
@Override
|
@Override
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
super.finalize();
|
super.finalize();
|
||||||
System.err.println("Class loader "+getName()+" finalized.");
|
logger.info("Class loader " + getName() + " finalized.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user