mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 01:34:04 +00:00
Let the host choose the jar copy directory and the logger of pack loads
ModuleHost.copyingJarsTo(directory) and loggingTo(logger) replace the fixed java.io.tmpdir and System.getLogger. A System.LoggerFinder would not work for a plugin, whose classes are not on the system class loader.
This commit is contained in:
1 parent
a325640d5d
commit
c5a54558fa
8 files changed
+97
-22
No files matched your search
@@ -210,7 +210,9 @@ Settings com.example.flora.FloraSettings of module example:flora from modules/fl
|
||||
var host = ModuleHost.of(builtInModules)
|
||||
.exposing("art.arcane.iris.engine.modules") // besides the API
|
||||
.reservingNamespaces("iris")
|
||||
.reservingFields(reservedHostFields);
|
||||
.reservingFields(reservedHostFields)
|
||||
.copyingJarsTo(cacheDirectory) // default: java.io.tmpdir
|
||||
.loggingTo(serverLogger); // a System.Logger; default: System.getLogger
|
||||
|
||||
// Per pack.
|
||||
try (var pack = LoadedPack.load(packRoot, host)) {
|
||||
@@ -287,7 +289,7 @@ Pack overworld: module jars use classes that neither the pack, Iris nor the JDK
|
||||
modules/stilt.jar: org.apache.logging.log4j.LogManager, org.apache.logging.log4j.Logger, org.slf4j.Logger, org.slf4j.LoggerFactory, org.slf4j.spi.LocationAwareLogger and 3 more
|
||||
```
|
||||
|
||||
A successful load logs one INFO summary through `System.Logger`:
|
||||
A successful load logs one INFO summary to the host's `System.Logger`:
|
||||
|
||||
```
|
||||
Pack overworld uses 2 modules:
|
||||
|
||||
Reference in new issue
Block a user