add some logging

This commit is contained in:
Aria Moradi
2021-09-11 00:48:17 +04:30
parent 0a7aa48f1e
commit 1f9ea0891e
2 changed files with 2 additions and 0 deletions

View File

@@ -141,6 +141,7 @@ object PackageTools {
* It may return an instance of HttpSource or SourceFactory depending on the extension.
*/
fun loadExtensionSources(jarPath: String, className: String): Any {
logger.debug { "loading jar with path: $jarPath" }
val classLoader = URLClassLoader(arrayOf<URL>(URL("file:$jarPath")))
val classToLoad = Class.forName(className, false, classLoader)
return classToLoad.getDeclaredConstructor().newInstance()