UKismetSystemLibrary::LogString
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallableBlueprintThreadSafeDevelopmentOnly
Description
Writes a string to the log without printing anything to screen. If bPrintToLog is true the message is visible in the Output Log at normal verbosity; otherwise it's logged at Verbose and generally won't show up.
Caveats & Gotchas
- • Marked DevelopmentOnly — calls compile out entirely in Shipping and Test builds, so don't rely on it for anything user-facing or for logging that must survive in production.
- • Unlike PrintString, this has no on-screen output and no WorldContextObject parameter — it only ever writes to the log.
Signature
static void LogString(const FString& InString = FString(TEXT("Hello")), bool bPrintToLog = true) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InString | const FString& | The string to write out. | FString(TEXT("Hello")) |
| bPrintToLog | bool | Whether to write the string to the Output Log at normal visibility; if false it's logged only at Verbose level. | true |
Return Type
void Example
Log a debug message C++
UKismetSystemLibrary::LogString(TEXT("Player spawned")); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?