mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 13:08:19 +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;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
@ -15,6 +18,8 @@ public class MinestomExtensionClassLoader extends HierarchyClassLoader {
|
||||
*/
|
||||
private final String mainClassName;
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(MinestomExtensionClassLoader.class);
|
||||
|
||||
public MinestomExtensionClassLoader(String extensionName, String mainClassName, URL[] urls, MinestomRootClassLoader root) {
|
||||
super(extensionName, urls, root);
|
||||
this.root = root;
|
||||
@ -95,7 +100,7 @@ public class MinestomExtensionClassLoader extends HierarchyClassLoader {
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
System.err.println("Class loader "+getName()+" finalized.");
|
||||
logger.info("Class loader " + getName() + " finalized.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user