Changeset 6250 for code/branches
- Timestamp:
- Dec 5, 2009, 2:23:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/util/OutputHandler.cc
r6105 r6250 174 174 void outputChanged(int level) 175 175 { 176 // Read ostringstream and store it 177 this->output_.push_back(std::make_pair(level, this->buffer_.str())); 178 // Clear content and flags 179 this->buffer_.str(std::string()); 176 if (!this->buffer_.str().empty()) 177 { 178 // Read ostringstream and store it 179 this->output_.push_back(std::make_pair(level, this->buffer_.str())); 180 // Clear content and flags 181 this->buffer_.str(std::string()); 182 } 180 183 this->buffer_.clear(); 181 184 } … … 214 217 this->registerOutputListener(this->consoleWriter_); 215 218 216 this->output_ 219 this->output_ = new MemoryLogWriter(); 217 220 // We capture as much input as the listener with the highest level 218 221 this->output_->softDebugLevel_ = getSoftDebugLevel(); … … 224 227 { 225 228 delete this->logFile_; 229 delete this->consoleWriter_; 226 230 delete this->output_; 227 231 }
Note: See TracChangeset
for help on using the changeset viewer.