Changeset 676 for trunk/quest-runner/src/main/java/de/ugoe/cs/quest/ui
- Timestamp:
- 08/28/12 16:56:29 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-runner/src/main/java/de/ugoe/cs/quest/ui/Runner.java
r674 r676 36 36 }; 37 37 38 public enum LOG4JTYPE {39 enable, disable40 }41 42 38 /** 43 39 * <p> … … 65 61 66 62 OptionParser parser = new OptionParser(); 67 OptionSpec<L OG4JTYPE> log4j =68 parser.accepts("log4j", "Allowed values: enable, disable").withRequiredArg()69 .ofType(L OG4JTYPE.class).defaultsTo(LOG4JTYPE.enable);63 OptionSpec<Level> log4j = 64 parser.accepts("log4j", "Allowed values: OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL").withRequiredArg() 65 .ofType(Level.class).defaultsTo(Level.INFO); 70 66 OptionSpec<UITYPE> ui = 71 67 parser.accepts("ui", "Allowed values: text, swt").withRequiredArg() … … 78 74 List<String> startupCommands = options.nonOptionArguments(); 79 75 try { 80 switch (options.valueOf(log4j)) 81 { 82 case enable: 83 new Log4JLogger(); 84 break; 85 case disable: 86 // do nothing 87 break; 88 default: 89 throw new AssertionError("reached source code that should be unreachable"); 76 if(options.valueOf(log4j)!=Level.OFF) { 77 new Log4JLogger(options.valueOf(log4j)); 90 78 } 91 79
Note: See TracChangeset
for help on using the changeset viewer.