/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/Foundation/Platform/Win/Log_Win.cpp
49 строк
1 KB
Sanakan8472
Cross-platform tracing system (ETW, LTTNG, Perfetto) (#1815)
15 фев 2026, 10:24
Не верифицирован
15 фев 2026, 10:24
fac0c1f
Код
Авторство
О чём код?
#include <Foundation/FoundationPCH.h> #if EZ_ENABLED(EZ_PLATFORM_WINDOWS) # include <Foundation/Application/Application.h> # include <Foundation/Logging/Log.h> # include <Foundation/Logging/TraceWriter.h> void ezLog::Print(const char* szText) { printf("%s", szText); ezLoggingEventData data; data.m_EventType = ezLogMsgType::InfoMsg; data.m_sText = szText; ezLogWriter::Tracing::LogMessageHandler(data); OutputDebugStringW(ezStringWChar(szText).GetData()); if (s_CustomPrintFunction) { s_CustomPrintFunction(szText); } fflush(stdout); fflush(stderr); } void ezLog::OsMessageBox(const ezFormatString& text) { ezStringBuilder tmp; ezStringBuilder display = text.GetText(tmp); display.Trim(" \n\r\t"); # if EZ_ENABLED(EZ_PLATFORM_WINDOWS_DESKTOP) const char* title = ""; if (ezApplication::GetApplicationInstance()) { title = ezApplication::GetApplicationInstance()->GetApplicationName(); } MessageBoxW(nullptr, ezStringWChar(display).GetData(), ezStringWChar(title), MB_OK); # else ezLog::Print(display); EZ_ASSERT_NOT_IMPLEMENTED; # endif } #endif