simulation_time.start();
// Set default logging parameters
- // xbt_log_control_set("simu.thres:verbose");
- xbt_log_control_set("simu.fmt:'[%h %r] [%c/%p] %m%n'");
- xbt_log_control_set("main.fmt:'[%c/%p] %m%n'");
+ bool do_log_control_set = true;
+ for (int i = 1 ; do_log_control_set && i < argc ; i++)
+ do_log_control_set = !(argv[i][0] == '-' && argv[i][1] != '-' &&
+ strchr(argv[i] + 1, 'v'));
+ if (do_log_control_set) {
+ // xbt_log_control_set("simu.thres:verbose");
+ xbt_log_control_set("simu.fmt:'[%h %r] [%c/%p] %m%n'");
+ xbt_log_control_set("main.fmt:'[%c/%p] %m%n'");
+ }
// Initialize some MSG internal data.
// Note: MSG_global_init() may throw an exception, but it seems
MSG_clean();
exit(parse_res ? EXIT_NO_FAILURE : EXIT_FAILURE_ARGS);
}
- INFO3("%s v%s (%s)", opt::program_name.c_str(), version::num.c_str(), version::date.c_str());
+ INFO3("%s v%s (%s)", opt::program_name.c_str(), version::num.c_str(),
+ version::date.c_str());
opt::print();
TRY {
int c;
opterr = 0;
- while ((c = getopt(*argc, argv, "a:bc:C:ehi:l:L:N:T:V")) != -1) {
+ while ((c = getopt(*argc, argv, "a:bc:C:ehi:l:L:N:T:vV")) != -1) {
switch (c) {
case 'a':
opt::loba_algo = optarg;
result = 0;
}
break;
+ case 'v':
+ // nothing to do: this option is checked at the very
+ // beginning of main()
+ break;
case 'V':
opt::version_requested = true;
break;
std::clog << o("-l value")
<< "print current load every n-th iterations, 0 to disable"
<< " (" << opt::log_rate << ")\n";
+ std::clog << o("-v")
+ << "verbose: do not override the default logging parameters\n";
std::clog << "\nAutomatic deployment options\n";
std::clog << o("-T name")