Changeset 407


Ignore:
Timestamp:
04/03/12 10:19:15 (12 years ago)
Author:
sherbold
Message:
  • added command line parameter "trace" with possible values "enable", "disable" to enable/disable trace messages. Default: enable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/Runner.java

    r396 r407  
    6363                OptionSpec<UITYPE> ui = parser.accepts("ui", "Allowed values: text, swt").withRequiredArg() 
    6464                                .ofType(UITYPE.class).defaultsTo(UITYPE.text); 
     65                OptionSpec<LOG4JTYPE> trace = parser.accepts("trace", "Allowed values: enable, disable").withRequiredArg().ofType(LOG4JTYPE.class).defaultsTo(LOG4JTYPE.enable); 
    6566                OptionSet options = parser.parse(args); 
    6667 
     
    7576                                break; 
    7677                        default: 
    77                                 throw new AssertionError("reached source code that should be unreachable impossible"); 
     78                                throw new AssertionError("reached source code that should be unreachable"); 
    7879                        } 
    7980                         
     
    8182                        case text: 
    8283                                TextConsole textConsole = new TextConsole(); 
     84                                if( options.valueOf(trace)==LOG4JTYPE.disable ) { 
     85                                        textConsole.setDebug(false); 
     86                                } 
    8387                                for (String command : startupCommands) { 
    8488                                        CommandExecuter.getInstance().exec(command); 
     
    9195                                break; 
    9296                        default: 
    93                                 throw new AssertionError("reached source code that should be unreachable impossible"); 
     97                                throw new AssertionError("reached source code that should be unreachable"); 
    9498                        } 
    9599                } catch (OptionException e) { 
Note: See TracChangeset for help on using the changeset viewer.