mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(system) Log loaded properties to the console
This commit is contained in:
parent
800ed6b1e9
commit
08f8b6e022
@ -5,6 +5,7 @@ import nu.marginalia.WmsaHome;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Properties;
|
||||
|
||||
public class ConfigLoader {
|
||||
|
||||
@ -21,7 +22,13 @@ public class ConfigLoader {
|
||||
System.out.println("Loading config from " + configPath);
|
||||
|
||||
try (var is = Files.newInputStream(configPath)) {
|
||||
System.getProperties().load(is);
|
||||
var toLoad = new Properties();
|
||||
toLoad.load(is);
|
||||
for (var key : toLoad.keySet()) {
|
||||
String k = (String) key;
|
||||
System.out.println("Loading property " + k + " = " + toLoad.getProperty(k));
|
||||
System.setProperty(k, toLoad.getProperty(k));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user