#include "Std_streams_module.h"

#include <fstream>

namespace MM
{
Std_streams_module  Std_streams_module::singleton_;

Std_streams_module::Std_streams_module () : Module ("Std_streams") { }

void Std_streams_module::
init ()
{
    //std::ofstream file ("__cerr.txt");
    //std::cerr.rdbuf (file.rdbuf());

/*    //std::ofstream out ("_cout.txt");
    std::ofstream err ("_cerr.txt");
    //std::ofstream log ("_clog.txt");

    //out_buf_ = std::cout.rdbuf();
    //err_buf_ = std::cerr.rdbuf();
    //log_buf_ = std::clog.rdbuf();

    //std::cout.rdbuf (out.rdbuf());
    std::cerr.rdbuf (err.rdbuf());
    //std::clog.rdbuf (log.rdbuf()); //*/
}

Std_streams_module::
~Std_streams_module()
{
    //std::cout.rdbuf (out_buf_);
    //std::cerr.rdbuf (err_buf_);
    //std::clog.rdbuf (log_buf_); //*/
}


}//MM

