source: branches/Release2.1/src/Logger.cpp@ 2985

Last change on this file since 2985 was 1030, checked in by mar637, 19 years ago

Various fixes to make >=gcc-3.4 compliant

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 543 bytes
Line 
1#include "Logger.h"
2
3using namespace asap;
4
5std::string Logger::log_ = std::string("");
6
7Logger::Logger()
8{
9 enableLog();
10}
11
12Logger::Logger(bool enabled)
13{
14 enabled_ = enabled;
15}
16Logger::~Logger()
17{
18}
19
20void Logger::pushLog(const std::string& s, bool newline ) const
21{
22 if (enabled_) {
23 log_+=s;
24 if ( newline ) log_+="\n";
25 };
26}
27std::string Logger::popLog() const
28{
29 std::string out;
30 if (enabled_) out=log_;log_="";
31 return out;
32}
33void Logger::enableLog()
34{
35 enabled_ = true;
36}
37void Logger::disableLog()
38{
39 enabled_ = false;
40}
Note: See TracBrowser for help on using the repository browser.