qa(diag): gate spawn/input setup logs behind gigline.SetupLogs cvar (default off)

TODO item: remove/gate the TEMP QA diagnostics. The GigLine SIM/GROUND probes
were already removed (PR #8); what remained was the settle-timer log and the
GigLine IN: input-setup logs. Now gated behind a TAutoConsoleVariable
(gigline.SetupLogs, default 0 in DefaultEngine.ini [ConsoleVariables]), so a
shipped build's log has no setup spam; re-enable at runtime with
'gigline.SetupLogs 1'. The -qaselftest QA logs are a deliberate release-check
feature (Docs/release-checks.md) and stay ungated. Verified on the packaged
build: 0 setup-log lines, QA suite still all PASS.
This commit is contained in:
zwitschi committed 2026-11-08 15:00:14 +01:00
1 parent 71acffec12
commit 3fda033726
3 files changed
+36 -14

No files matched your search

+5
View File
@@ -15,6 +15,11 @@ TransitionMap=/Game/Hollywood/DemoMap
; static lighting outright — nothing to build, no warning.
r.AllowStaticLighting=False
[ConsoleVariables]
; Dev diagnostics (spawn/input setup logs) are off by default in shipped builds.
; Re-enable at runtime: `gigline.SetupLogs 1`.
gigline.SetupLogs=0
[URL]
GameName=GigLine
@@ -15,6 +15,14 @@
#include "Misc/CommandLine.h"
#include "Misc/Parse.h"
// Development-only diagnostics for the walkable demo. These describe the spawn
// and input setup and are not needed in a shipped build's log spam; disable
// with `-NoGigLineSetupLogs` (or set the cvar in release config).
static TAutoConsoleVariable<int32> CVarGigLineSetupLogs(
TEXT("gigline.SetupLogs"),
1,
TEXT("Log GigLine spawn/input setup diagnostics (0=off, 1=on)."));
AGigLineCharacter::AGigLineCharacter()
{
PrimaryActorTick.bCanEverTick = false;
@@ -102,15 +110,18 @@ void AGigLineCharacter::LoadInputAssets()
ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PC->GetLocalPlayer()))
{
Subsystem->AddMappingContext(MappingContext, 0);
UE_LOG(LogTemp, Log, TEXT("GigLine IN: pushed mapping context %s"),
*MappingContext->GetName());
if (CVarGigLineSetupLogs.GetValueOnGameThread())
{
UE_LOG(LogTemp, Log, TEXT("GigLine IN: pushed mapping context %s"),
*MappingContext->GetName());
}
}
else
else if (CVarGigLineSetupLogs.GetValueOnGameThread())
{
UE_LOG(LogTemp, Log, TEXT("GigLine IN: no enhanced input subsystem on local player"));
}
}
else
else if (CVarGigLineSetupLogs.GetValueOnGameThread())
{
UE_LOG(LogTemp, Log, TEXT("GigLine IN: no PlayerController at LoadInputAssets"));
}
@@ -143,8 +154,11 @@ void AGigLineCharacter::BeginPlay()
StartLocation = GetActorLocation();
StartRotation = GetActorRotation();
GetWorldTimerManager().ClearTimer(this->SettleHandle);
UE_LOG(LogTemp, Log, TEXT("GigLine: start captured on ground at Z %.0f"),
StartLocation.Z);
if (CVarGigLineSetupLogs.GetValueOnGameThread())
{
UE_LOG(LogTemp, Log, TEXT("GigLine: start captured on ground at Z %.0f"),
StartLocation.Z);
}
}
}
}, 0.25f, true);
@@ -410,12 +424,15 @@ void AGigLineCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCo
Input->BindAction(JumpAction, ETriggerEvent::Started, this, &AGigLineCharacter::StartJump);
Input->BindAction(JumpAction, ETriggerEvent::Completed, this, &AGigLineCharacter::StopJump);
}
UE_LOG(LogTemp, Log, TEXT("GigLine IN: bound %d actions; ctx=%s move=%s look=%s jmp=%s"),
(Input ? 1 : 0),
MappingContext ? TEXT("ok") : TEXT("nil"),
MoveAction ? TEXT("ok") : TEXT("nil"),
LookAction ? TEXT("ok") : TEXT("nil"),
JumpAction ? TEXT("ok") : TEXT("nil"));
if (CVarGigLineSetupLogs.GetValueOnGameThread())
{
UE_LOG(LogTemp, Log, TEXT("GigLine IN: bound %d actions; ctx=%s move=%s look=%s jmp=%s"),
(Input ? 1 : 0),
MappingContext ? TEXT("ok") : TEXT("nil"),
MoveAction ? TEXT("ok") : TEXT("nil"),
LookAction ? TEXT("ok") : TEXT("nil"),
JumpAction ? TEXT("ok") : TEXT("nil"));
}
}
namespace