added colored output for streams as well
This commit is contained in:
@ -13,20 +13,3 @@ std::string* ServiceInterfaceStream::getPreamble() {
|
||||
return streambuf.getPreamble();
|
||||
}
|
||||
|
||||
void ServiceInterfaceStream::print(std::string error,
|
||||
bool withPreamble, bool withNewline, bool flush) {
|
||||
if(not streambuf.isBuffered() and withPreamble) {
|
||||
*this << getPreamble() << error;
|
||||
}
|
||||
else {
|
||||
*this << error;
|
||||
}
|
||||
|
||||
if(withNewline) {
|
||||
*this << "\n";
|
||||
}
|
||||
// if mode is non-buffered, no need to flush.
|
||||
if(flush and streambuf.isBuffered()) {
|
||||
this->flush();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user