Hi, I am writing a program which is using taglib to read audio tags. When calling the taglib dll, sometimes a std::cerr message is generated. I want to catch these messages and save them in a log. I have tried
std::ofstream ostr("log.txt"); //or std::ostringstream ostr;
std::streambuf * old_buffer = std::cerr.rdbuf();
std::cerr.rdbuf(ostr.rdbuf());
which works well for std::cerr messages made from within my program, but the std::cerr messages from the dll are not captured. Any clues?