CToolLog
Overview
Logging system built on top of UE_LOG with the LogCCdryx category. Every log entry includes a timestamp, the caller object name (with outer hierarchy), and a numeric code marker for traceability.
Log format : HH:MM:SS.ms [ObjectName \ OuterName] @ code : message
Functions
| Name | Description |
|---|---|
| info | Log at Display level. On mobile, also shows on-screen message (silver, 5s). |
| warn | Log at Warning level. On mobile, on-screen message (orange, 10s). |
| error | Log at Error level. On mobile, on-screen message (red, 15s). |
| formatText | Format a string with ordered arguments. |
| printStackTrace | Dumps the current call stack as a warning log. |
// info, warn, error share the same signature:
// (const UObject* caller, int64 codeMarker, const FString& message, const FStringFormatOrderedArguments& args = {})
info(this, 2311111502, TEXT("Game instance : {0}"), {GetName()});
warn(this, 2408211801, TEXT("STOPPING"));
error(this, 2312250001, TEXT("Missing asset {0}"), {assetName});
// formatText returns a formatted FString
FString s = formatText(TEXT("hello {0}"), {42});
// printStackTrace dumps the call stack as a warning
printStackTrace();Macros
| Name | Description |
|---|---|
| CDRYX_LOG_INFO | Direct UE_LOG wrapper at Display level. |
| CDRYX_LOG_WARN | Direct UE_LOG wrapper at Warning level. |
| CDRYX_LOG_ERROR | Direct UE_LOG wrapper at Error level. |
| CPRINT | Shortcut for info(this, 0, …). Use inside UObject methods. |
| CPRINT_STATIC | Shortcut for info(nullptr, 0, …). Use in static contexts. |
// Direct UE_LOG wrappers (printf-style formatting)
CDRYX_LOG_INFO(TEXT("hello %s"), *name)
CDRYX_LOG_WARN(TEXT("warning %d"), code)
CDRYX_LOG_ERROR(TEXT("error %s"), *msg)
// CPRINT uses info() with code=0, requires 'this' context
CPRINT(TEXT("Hello {0}"), {42})
// CPRINT_STATIC uses info() with nullptr context, for static functions
CPRINT_STATIC(TEXT("Static log {0}"), {"test"})