improved cli args

master
Ondřej Hruška 11 years ago
parent 162bcc9b7e
commit 1b9c8c6be7
  1. 2
      Makefile
  2. 10
      src/mightypork/rogue/Launcher.java

@ -39,7 +39,7 @@ run: $(OUT)
java -jar $(OUT) -w .rogue-save
debug: $(OUT)
java -jar $(OUT) -w .rogue-save --debug
java -jar $(OUT) -w .rogue-save --verbose --debug-bus
stats:
@-echo "Commits:" `git rev-list HEAD --count`

@ -23,6 +23,7 @@ public class Launcher {
final Level llFile = Level.ALL;
File workdir = null;
boolean logBus = false;
try {
boolean localWorkdir = false;
@ -41,11 +42,11 @@ public class Launcher {
llSyso = Level.OFF;
continue;
} else if (arg.equals("--warnings") || arg.equals("-e")) {
} else if (arg.equals("--warn") || arg.equals("-e")) {
llSyso = Level.WARNING;
continue;
} else if (arg.equals("--debug") || arg.equals("--verbose") || arg.equals("-v")) {
} else if (arg.equals("--verbose") || arg.equals("-v")) {
llSyso = Level.ALL;
continue;
@ -53,6 +54,9 @@ public class Launcher {
printHelp();
System.exit(0);
} else if (arg.equals("--debug-bus")) {
logBus = true;
} else {
System.err.println("Unknown argument: " + arg);
printHelp();
@ -76,7 +80,7 @@ public class Launcher {
final BaseApp app = new RogueApp(workdir, true);
app.opt().setLogLevel(llFile, llSyso);
app.opt().setBusLogging(false);//TODO temporary
app.opt().setBusLogging(logBus);
app.start();
}

Loading…
Cancel
Save