I normally add the following to the main.cc in the beginning of the function wWinMain:
bool debug = true;
std::string log = "verbose";
if (debug) {
talk_base::LogMessage::LogToDebug(talk_base::LS_VERBOSE);
}
if (!log.empty()) {
talk_base::FileStream *fs = new talk_base::FileStream();
if (!fs->Open("peerconnectionclient.log", "w", NULL)) {
LOG(INFO) << "Could not open file";
} else {
talk_base::LogMessage::LogToStream(fs, talk_base::LS_VERBOSE);
}
}
The logs will end up in trunk/talk. It is not perfect, but it works for me.
Thanks.