Class RedirectStandardOutput

Class Documentation

class RedirectStandardOutput

Redirect from one stream to another stream.

E.g. common::RedirectStandardOutput<> redirect(std::cout, mycallback); { // Redirects std::cout to LOG(ERROR) RedirectStandardOutputToGlog<> capture(std::cout, google::ERROR); std::cout << “Test” } { // Redirects std::cout to VLOG(20) RedirectStandardOutputToGlog<> capture(std::cout, google::INFO, 20); std::cout << “Test” }