Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 28, 2011, 10:35:41 PM (13 years ago)
Author:
landauf
Message:

added BaseWriter, a common base class of ConsoleWriter, LogWriter, and also the Shell in future

File:
1 edited

Legend:

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

    r8787 r8794  
    6464    }
    6565
    66     void LogWriter::output(OutputLevel level, OutputContext context, const std::vector<std::string>& lines)
    67     {
    68         if (!this->file_.is_open())
    69             return;
    70 
    71         const std::string& prefix = OutputManager::getInstance().getDefaultPrefix(level, context);
    72         std::string blanks(prefix.length(), ' ');
    73 
    74         for (size_t i = 0; i < lines.size(); ++i)
    75             this->printLine((i == 0 ? prefix : blanks) + lines[i]);
    76     }
    77 
    7866    void LogWriter::openFile()
    7967    {
     
    114102    void LogWriter::printLine(const std::string& line)
    115103    {
     104        if (!this->file_.is_open())
     105            return;
     106
    116107        // Get current time
    117108        time_t rawtime;
Note: See TracChangeset for help on using the changeset viewer.