MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / LogToFile

Method LogToFile

Dependencies/ImGui/src/imgui.cpp:15180–15202  ·  view source on GitHub ↗

Start logging/capturing text output to given file

Source from the content-addressed store, hash-verified

15178
15179// Start logging/capturing text output to given file
15180void ImGui::LogToFile(int auto_open_depth, const char* filename)
15181{
15182 ImGuiContext& g = *GImGui;
15183 if (g.LogEnabled)
15184 return;
15185
15186 // FIXME: We could probably open the file in text mode "at", however note that clipboard/buffer logging will still
15187 // be subject to outputting OS-incompatible carriage return if within strings the user doesn't use IM_NEWLINE.
15188 // By opening the file in binary mode "ab" we have consistent output everywhere.
15189 if (!filename)
15190 filename = g.IO.LogFilename;
15191 if (!filename || !filename[0])
15192 return;
15193 ImFileHandle f = ImFileOpen(filename, "ab");
15194 if (!f)
15195 {
15196 IM_ASSERT(0);
15197 return;
15198 }
15199
15200 LogBegin(ImGuiLogFlags_OutputFile, auto_open_depth);
15201 g.LogFile = f;
15202}
15203
15204// Start logging/capturing text output to clipboard
15205void ImGui::LogToClipboard(int auto_open_depth)

Callers

nothing calls this directly

Calls 1

ImFileOpenFunction · 0.70

Tested by

no test coverage detected