Simulating spdlog in Unreal Engine

Need to use third-party libraries that depend on spdlog in your Unreal project? Here’s how to simulate the spdlog API using Unreal’s native UE_LOG system, to let you avoid adding extra dependencies while keeping your code clean. We’ll create a logging utility class that matches the spdlog interface, handling type conversions to FString and formatting along the way. Implementation Here’s the code that bridges spdlog and Unreal’s logging system: #pragma once #include "Containers/UnrealString....

September 25, 2024 · 3 min · Georgy Treshchev