Misc logging tidy

- Removed leftover debug System.out.println in ASM
- Removed unused logger from Share
- Routed ResourceUtil errors into FPLog instead of System.out/System.err
This commit is contained in:
Ven committed 2024-06-15 19:46:56 +01:00
1 parent 722a08d9cb
commit 418a9ccd12
3 files changed
+6 -13

No files matched your search

@@ -23,6 +23,7 @@
package com.falsepattern.lib.util;
import com.falsepattern.lib.StableAPI;
import com.falsepattern.lib.internal.FPLog;
import lombok.experimental.UtilityClass;
import lombok.val;
@@ -125,15 +126,14 @@ public final class ResourceUtil {
URL resource = new URL("jar:" + file.substring(0, id) + "!" + resourcePath);
return resource.openStream();
} catch (IOException e) {
System.err.println("Failed to load resource " + resourcePath + " from jar " + file.substring(0, id));
e.printStackTrace();
FPLog.LOG.error("Failed to load resource " + resourcePath + " from jar " + file.substring(0, id), e);
}
}
//Fallback logic
System.out.println("Using fallback resource loading logic for "
+ resourcePath
+ " with reference to "
+ referenceClass.getName());
FPLog.LOG.warn("Using fallback resource loading logic for "
+ resourcePath
+ " with reference to "
+ referenceClass.getName());
return referenceClass.getResourceAsStream(resourcePath);
}