video : add video debug output to video.log
Change-Id: I266b8519aceba214803789a6b1f23876a974a1f8
Tuleap: #1226
diff --git a/RingDebug.cpp b/RingDebug.cpp
index c5475b2..2524ff0 100644
--- a/RingDebug.cpp
+++ b/RingDebug.cpp
@@ -56,7 +56,18 @@
/* fire the event. */
auto line = ref new String(wString.c_str(), wString.length());
messageToScreen(line);
- FileIO::AppendTextAsync(_logFile, line+"\n");
+ FileIO::AppendTextAsync(_logFile, line + "\n");
+}
+
+void RingClientUWP::RingDebug::WriteLine(String^ str)
+{
+ /* save in file */
+ FileIO::AppendTextAsync(_videoFile, str + "\n");
+
+ /* screen in visual studio console */
+ std::wstringstream wStringstream;
+ wStringstream << str->Data() << "\n";
+ OutputDebugString(wStringstream.str().c_str());
}
RingClientUWP::RingDebug::RingDebug()
@@ -70,5 +81,10 @@
this->_logFile = file;
});
+ task<StorageFile^>(storageFolder->CreateFileAsync("video.log", CreationCollisionOption::ReplaceExisting)).then([this](StorageFile^ file)
+ {
+ this->_videoFile = file;
+ });
+
}