Unify inspector and console panel actions

This commit is contained in:
2026-03-27 00:08:46 +08:00
parent 31675e00c8
commit 3ebad63874
15 changed files with 296 additions and 142 deletions

View File

@@ -0,0 +1,27 @@
#pragma once
#include "Core/EditorConsoleSink.h"
#include <XCEngine/Debug/ConsoleLogSink.h>
#include <XCEngine/Debug/FileLogSink.h>
#include <XCEngine/Debug/Logger.h>
#include <memory>
#include <string>
namespace XCEngine {
namespace Editor {
inline void ConfigureEditorLogging(const std::string& executableDirectory) {
auto& logger = Debug::Logger::Get();
logger.AddSink(std::make_unique<Debug::ConsoleLogSink>());
logger.AddSink(std::make_unique<Debug::EditorConsoleSink>());
const std::string logPath = executableDirectory + "\\editor.log";
logger.AddSink(std::make_unique<Debug::FileLogSink>(logPath.c_str()));
logger.Info(Debug::LogCategory::General, "Editor Application starting...");
logger.Info(Debug::LogCategory::General, ("Log file: " + logPath).c_str());
}
} // namespace Editor
} // namespace XCEngine