Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8831


Ignore:
Timestamp:
Aug 8, 2011, 10:19:09 PM (13 years ago)
Author:
landauf
Message:

fixed wrong config value callback in Shell
fixed bug in ConfigFileManager: if a vector contained only one element at index 0, size 0 instead of 1 was returned
removed output context "output"
the configurable vector of output contexts now contains "example" as default to make the config vector visible in the config file

Location:
code/branches/output/src/libraries
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/core/ConfigFileManager.cc

    r8806 r8831  
    123123        for (std::list<ConfigFileEntry*>::const_iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
    124124            if ((*it)->getName() == name)
    125                 if ((*it)->getIndex() > size)
    126                     size = (*it)->getIndex();
    127         if (size == 0)
    128             return 0;
    129         else
    130             return (size + 1);
     125                if ((*it)->getIndex() >= size)
     126                    size = (*it)->getIndex() + 1;
     127        return size;
    131128    }
    132129
  • code/branches/output/src/libraries/core/command/Shell.cc

    r8808 r8831  
    135135                               this->configurableContexts_)
    136136            .description("Additional output contexts shown in the " + this->getName())
    137             .callback(static_cast<BaseWriter*>(this), &BaseWriter::changedConfigurableLevels);
     137            .callback(static_cast<BaseWriter*>(this), &BaseWriter::changedConfigurableContexts);
    138138    }
    139139
  • code/branches/output/src/libraries/util/output/BaseWriter.cc

    r8808 r8831  
    3939        this->configurableMaxLevel_ = level::none;
    4040        this->configurableContextsMaxLevel_ = level::verbose;
     41        this->configurableContexts_.push_back("example");
     42        this->changedConfigurableLevels();
    4143    }
    4244
  • code/branches/output/src/libraries/util/output/LogWriter.cc

    r8799 r8831  
    6969
    7070        if (this->bDefaultPath_)
    71             OutputManager::getInstance().pushMessage(level::user_info, context::output(), "Opening log file " + name);
     71            OutputManager::getInstance().pushMessage(level::user_info, context::undefined(), "Opening log file " + name);
    7272
    7373        this->file_.open(name.c_str(), std::fstream::out);
     
    7676            this->printLine("Log file opened", level::none);
    7777        else
    78             OutputManager::getInstance().pushMessage(level::user_warning, context::output(), "Failed to open log file. File logging disabled.");
     78            OutputManager::getInstance().pushMessage(level::user_warning, context::undefined(), "Failed to open log file. File logging disabled.");
    7979    }
    8080
     
    9090    void LogWriter::setLogPath(const std::string& path)
    9191    {
    92         OutputManager::getInstance().pushMessage(level::internal_info, context::output(), "Migrating log file from " + this->path_ + "\nto " + path);
     92        OutputManager::getInstance().pushMessage(level::internal_info, context::undefined(), "Migrating log file from " + this->path_ + "\nto " + path);
    9393
    9494        this->closeFile();
  • code/branches/output/src/libraries/util/output/OutputDefinitions.h

    r8811 r8831  
    8585            REGISTER_OUTPUT_CONTEXT(super);
    8686            REGISTER_OUTPUT_CONTEXT(language);
    87             REGISTER_OUTPUT_CONTEXT(output);
    8887            REGISTER_OUTPUT_CONTEXT(commands);
    8988            REGISTER_OUTPUT_CONTEXT(executor);
Note: See TracChangeset for help on using the changeset viewer.