Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 25, 2011, 2:47:49 PM (13 years ago)
Author:
landauf
Message:

output contexts are now defined as functions instead of global constants. this should avoid a static initialization fiasco and reduces the amount of context registrations (previosly it was N*M registrations with N = number of contexts and M = number of source files, now they are registered on demand). slightly worse performance though.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/util/output/LogWriter.cc

    r8776 r8777  
    8383
    8484        if (this->bDefaultPath_)
    85             OutputManager::getInstance().pushMessage(level::user_info, context::output, "Opening log file " + name);
     85            OutputManager::getInstance().pushMessage(level::user_info, context::output(), "Opening log file " + name);
    8686
    8787        this->file_.open(name.c_str(), std::fstream::out);
     
    9090            this->printLine("Log file opened");
    9191        else
    92             OutputManager::getInstance().pushMessage(level::user_warning, context::output, "Failed to open log file. File logging disabled.");
     92            OutputManager::getInstance().pushMessage(level::user_warning, context::output(), "Failed to open log file. File logging disabled.");
    9393    }
    9494
     
    104104    void LogWriter::setLogPath(const std::string& path)
    105105    {
    106         OutputManager::getInstance().pushMessage(level::internal_info, context::output, "Migrating log file from " + this->path_ + "\nto " + path);
     106        OutputManager::getInstance().pushMessage(level::internal_info, context::output(), "Migrating log file from " + this->path_ + "\nto " + path);
    107107
    108108        this->closeFile();
Note: See TracChangeset for help on using the changeset viewer.