Fix search path and log when testing.
This commit is contained in:
parent
6a1eef84c9
commit
e1e4e9d0d0
3 changed files with 16 additions and 1 deletions
|
|
@ -117,3 +117,16 @@ data:
|
|||
"spice":
|
||||
"port": {{ .Values.vm.spicePort }}
|
||||
# "usbRedirects": 2
|
||||
|
||||
logging.properties: |
|
||||
handlers=java.util.logging.ConsoleHandler
|
||||
|
||||
#org.jgrapes.level=FINE
|
||||
#org.jgrapes.core.handlerTracking.level=FINER
|
||||
|
||||
org.jdrupes.vmoperator.runner.qemu.level=FINE
|
||||
|
||||
java.util.logging.ConsoleHandler.level=ALL
|
||||
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
|
||||
java.util.logging.SimpleFormatter.format=%1$tb %1$td %1$tT %4$s %5$s%6$s%n
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ public class Runner extends Component {
|
|||
attach(new SocketConnector(channel()));
|
||||
attach(qemuMonitor = new QemuMonitor(channel()));
|
||||
|
||||
// Configuration store with file in /etc (default)
|
||||
// Configuration store with file in /etc/opt (default)
|
||||
File config = new File(cmdLine.getOptionValue('c',
|
||||
"/etc/opt/" + APP_NAME + "/config.yaml"));
|
||||
// Don't rely on night config to produce a good exception
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ public class FsdUtils {
|
|||
*
|
||||
* 1. the current working directory,
|
||||
* 1. the {@link #configHome(String)}
|
||||
* 1. the subdirectory `appName` of `/etc/opt`
|
||||
* 1. the subdirectory `appName` of `/etc`
|
||||
*
|
||||
* @param appName the application name
|
||||
|
|
@ -156,6 +157,7 @@ public class FsdUtils {
|
|||
String filename) {
|
||||
var candidates = List.of(Path.of(filename),
|
||||
configHome(appName).resolve(filename),
|
||||
Path.of("/etc").resolve("opt").resolve(appName).resolve(filename),
|
||||
Path.of("/etc").resolve(appName).resolve(filename));
|
||||
for (var candidate : candidates) {
|
||||
if (Files.exists(candidate)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue