Changeset 11530


Ignore:
Timestamp:
07/22/11 08:48:30 (13 years ago)
Author:
tbretz
Message:
Flush the output during startup immediately.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Main.h

    r11483 r11530  
    5050    WindowLog &wout = shell.GetStreamOut();
    5151
     52    const bool backlog = wout.GetBacklog();
     53    const bool null    = wout.GetNullOutput();
     54    wout.SetBacklog(false);
     55    wout.SetNullOutput(false);
     56    wout.Display(true);
     57
    5258    if (conf.Has("log"))
    5359        if (!wout.OpenLogFile(conf.Get<string>("log")))
     
    7682    io_service.Write(now, "\\------------------- Evaluating options -----------------");
    7783    const int rc = io_service.EvalOptions(conf);
     84    if (rc>=0)
     85    {
     86        ostringstream str;
     87        str << "Exit triggered by EvalOptions with rc=" << rc;
     88        io_service.Write(now, str.str(), MessageImp::kError);
     89        return rc;
     90    }
    7891
    7992    const map<string,string> &wco = conf.GetWildcardOptions();
     
    94107            io_service.Write(now, str.str(), MessageImp::kWarn);
    95108        }
     109        io_service.Write(now, "Unrecognized options found, will exit with rc=127", MessageImp::kError);
    96110        return 127;
    97111    }
    98112
    99113    io_service.Message("==================== Starting main loop =================");
    100     if (rc>=0)
    101         return rc;
     114
     115    wout.SetNullOutput(null);
     116    wout.SetBacklog(backlog);
    102117
    103118    shell.SetReceiver(io_service);
Note: See TracChangeset for help on using the changeset viewer.