Chi-Tech
chi_logstream.cc
Go to the documentation of this file.
1#include "chi_logstream.h"
2
4
6{
7 if (dummy_) return;
8
9 std::string line, oline;
10 while (std::getline(*this, line))
11 oline += log_header_ + line + '\n' + StringStreamColor(RESET);
12
13 if (!oline.empty())
14 *log_stream_ << oline << std::flush;
15}
std::ostream * log_stream_
Definition: chi_logstream.h:14
virtual ~LogStream()
Definition: chi_logstream.cc:5
const bool dummy_
Definition: chi_logstream.h:16
std::string log_header_
Definition: chi_logstream.h:15
std::string StringStreamColor(StringSteamColorCode code)