Chi-Tech
chi_logstream.cc
Go to the documentation of this file.
1
#include "
chi_logstream.h
"
2
3
#include "
stringstream_color.h
"
4
5
chi::LogStream::~LogStream
()
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
}
chi_logstream.h
chi::LogStream::log_stream_
std::ostream * log_stream_
Definition:
chi_logstream.h:14
chi::LogStream::~LogStream
virtual ~LogStream()
Definition:
chi_logstream.cc:5
chi::LogStream::dummy_
const bool dummy_
Definition:
chi_logstream.h:16
chi::LogStream::log_header_
std::string log_header_
Definition:
chi_logstream.h:15
chi::StringStreamColor
std::string StringStreamColor(StringSteamColorCode code)
Definition:
stringstream_color.cc:5
chi::RESET
@ RESET
Definition:
stringstream_color.h:10
stringstream_color.h
framework
logging
chi_logstream.cc
Generated by
1.9.3