MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / SaveLogFile

Method SaveLogFile

DebugView++/MainFrame.cpp:798–817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

796}
797
798void CMainFrame::SaveLogFile(const std::wstring& filename)
799{
800 UISetText(0, WStr(wstringbuilder() << "Saving " << filename));
801 Win32::ScopedCursor cursor(::LoadCursor(nullptr, IDC_WAIT));
802
803 std::ofstream fs;
804 OpenLogFile(fs, filename);
805 int count = m_logFile.Count();
806 for (int i = 0; i < count; ++i)
807 {
808 auto msg = m_logFile[i];
809 WriteLogFileMessage(fs, msg.time, msg.systemTime, msg.processId, msg.processName, msg.text);
810 }
811 fs.close();
812 if (!fs)
813 Win32::ThrowLastError(filename);
814
815 m_logFileName = filename;
816 UpdateStatusBar();
817}
818
819void CMainFrame::SaveViewFile(const std::wstring& filename)
820{

Callers

nothing calls this directly

Calls 5

WStrClass · 0.85
OpenLogFileFunction · 0.85
WriteLogFileMessageFunction · 0.85
ThrowLastErrorFunction · 0.85
CountMethod · 0.45

Tested by

no test coverage detected