MCPcopy Create free account
hub / github.com/dobin/RedEdr / LOG_W

Function LOG_W

RedEdrPplService/logging.cpp:101–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99
100
101void LOG_W(int verbosity, const wchar_t* format, ...)
102{
103 WCHAR wide_message[DATA_BUFFER_SIZE] = L"[RedEdr PPL] ";
104 size_t offset = wcslen(wide_message);
105
106 va_list arg_ptr;
107 va_start(arg_ptr, format);
108 int ret = vswprintf(&wide_message[offset], DATA_BUFFER_SIZE - offset, format, arg_ptr);
109 va_end(arg_ptr);
110
111 // Convert wide string to UTF-8
112 char message[DATA_BUFFER_SIZE];
113 int result = WideCharToMultiByte(CP_UTF8, 0, wide_message, -1, message, sizeof(message), NULL, NULL);
114 if (result > 0) {
115 WriteToLogFile(message);
116 }
117}
118
119
120void CleanupFileLogging() {

Callers 11

ConnectEmitterPipeFunction · 0.70
DisconnectEmitterPipeFunction · 0.70
event_callbackFunction · 0.70
ServiceControlPipeThreadFunction · 0.70
StartControlFunction · 0.70
StopControlFunction · 0.70
start_child_processFunction · 0.70
ShutdownServiceFunction · 0.70
ServiceCtrlHandlerFunction · 0.70
ServiceMainFunction · 0.70
ServiceEntryFunction · 0.70

Calls 1

WriteToLogFileFunction · 0.85

Tested by

no test coverage detected