MCPcopy Create free account
hub / github.com/cinder/Cinder / LogToFile

Method LogToFile

src/imgui/imgui.cpp:14976–14998  ·  view source on GitHub ↗

Start logging/capturing text output to given file

Source from the content-addressed store, hash-verified

14974
14975// Start logging/capturing text output to given file
14976void ImGui::LogToFile(int auto_open_depth, const char* filename)
14977{
14978 ImGuiContext& g = *GImGui;
14979 if (g.LogEnabled)
14980 return;
14981
14982 // FIXME: We could probably open the file in text mode "at", however note that clipboard/buffer logging will still
14983 // be subject to outputting OS-incompatible carriage return if within strings the user doesn't use IM_NEWLINE.
14984 // By opening the file in binary mode "ab" we have consistent output everywhere.
14985 if (!filename)
14986 filename = g.IO.LogFilename;
14987 if (!filename || !filename[0])
14988 return;
14989 ImFileHandle f = ImFileOpen(filename, "ab");
14990 if (!f)
14991 {
14992 IM_ASSERT(0);
14993 return;
14994 }
14995
14996 LogBegin(ImGuiLogFlags_OutputFile, auto_open_depth);
14997 g.LogFile = f;
14998}
14999
15000// Start logging/capturing text output to clipboard
15001void ImGui::LogToClipboard(int auto_open_depth)

Callers

nothing calls this directly

Calls 1

ImFileOpenFunction · 0.70

Tested by

no test coverage detected