/* * iostream.cpp * * Created on: Feb 12, 2016 * Author: Radovan Cerveny */ #include <iostream> namespace ext { const int CERR_FD = 2; // used for measurements output const int CMEASURE_FD = 5; ofdstream cmeasure ( CMEASURE_FD, CERR_FD ); // used for logging const int CLOG_FD = 4; fdaccessor clog_fdaccessor ( CLOG_FD, CERR_FD ); fdstreambuf clog_fdstreambuf ( clog_fdaccessor.get_fd ( ) ); RelinkIO::RelinkIO ( ) { std::clog.rdbuf ( & clog_fdstreambuf ); std::clog.clear ( ); } RelinkIO::~RelinkIO ( ) { std::clog.flush ( ); } RelinkIO relinkio; } /* namespace ext */