Unified logging: Replace LogSystem with EditorConsoleSink
- Created EditorConsoleSink (implements ILogSink interface) - EditorConsoleSink stores logs in memory buffer (max 1000 entries) - Added to Debug::Logger in Application::Initialize() - ConsolePanel now reads from EditorConsoleSink via static GetInstance() - Removed separate LogSystem singleton - Removed editor/src/Core/LogEntry.h (no longer needed) Now Editor and Engine share the same Debug::Logger, with ConsolePanel displaying logs via EditorConsoleSink.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "Application.h"
|
||||
#include "Layers/EditorLayer.h"
|
||||
#include "Core/EditorContextImpl.h"
|
||||
#include "Core/EditorConsoleSink.h"
|
||||
#include <XCEngine/Debug/Logger.h>
|
||||
#include <XCEngine/Debug/FileLogSink.h>
|
||||
#include <XCEngine/Debug/ConsoleLogSink.h>
|
||||
@@ -66,6 +67,7 @@ bool Application::Initialize(HWND hwnd) {
|
||||
|
||||
// Initialize logging first
|
||||
Debug::Logger::Get().AddSink(std::make_unique<Debug::ConsoleLogSink>());
|
||||
Debug::Logger::Get().AddSink(std::make_unique<Debug::EditorConsoleSink>());
|
||||
|
||||
// Get exe directory for log file path
|
||||
wchar_t exePath[MAX_PATH];
|
||||
|
||||
Reference in New Issue
Block a user