Concert.Replication.LogStreamRequestsAndResponsesOnClient
Concert.Replication.LogStreamRequestsAndResponsesOnClient
#Overview
name: Concert.Replication.LogStreamRequestsAndResponsesOnClient
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to log changes to streams.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Concert.Replication.LogStreamRequestsAndResponsesOnClient is to enable logging of changes to streams in the Concert replication system on the client side. This setting variable is primarily used for debugging and monitoring purposes within the Concert synchronization framework.
This setting variable is relied upon by the ConcertSyncClient module, which is part of the Concert plugin for Unreal Engine. Specifically, it’s used in the replication management system of the Concert synchronization framework.
The value of this variable is set through a console variable (CVar) system. It’s defined as a TAutoConsoleVariable
The associated variable CVarLogStreamRequestsAndResponsesOnClient directly interacts with this setting. They are essentially the same variable, with CVarLogStreamRequestsAndResponsesOnClient being the C++ variable that controls the behavior defined by the Concert.Replication.LogStreamRequestsAndResponsesOnClient setting.
Developers must be aware that enabling this variable will increase the amount of logging output, which could impact performance, especially in production environments. It should primarily be used for debugging purposes.
Best practices when using this variable include:
- Only enable it when actively debugging stream-related issues in the Concert replication system.
- Remember to disable it after debugging to avoid unnecessary performance overhead.
- Use it in conjunction with other logging tools to get a comprehensive view of the replication system’s behavior.
Regarding the associated variable CVarLogStreamRequestsAndResponsesOnClient:
The purpose of CVarLogStreamRequestsAndResponsesOnClient is to provide a programmatic way to control the logging of stream requests and responses in the Concert replication system.
It’s used within the ConcertSyncClient module, specifically in the FReplicationManagerState_Connected class.
The value of this variable is set when the TAutoConsoleVariable is initialized, but can be changed at runtime through console commands.
This variable directly controls when the Private::LogNetworkMessage function is called with stream-related data.
Developers should be aware that this variable directly affects the logging behavior of the replication system. When true, it will cause additional logging output.
Best practices for using CVarLogStreamRequestsAndResponsesOnClient include:
- Use it in development and testing environments for debugging.
- Consider wrapping calls to Private::LogNetworkMessage in #if WITH_EDITOR preprocessor directives to ensure they’re stripped from shipping builds.
- Be mindful of the performance impact when enabling this logging in scenarios with high replication activity.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/Replication/Manager/ReplicationManagerState_Connected.cpp:44
Scope (from outer to inner):
file
namespace UE::ConcertSyncClient::Replication
Source code excerpt:
TAutoConsoleVariable<bool> CVarLogStreamRequestsAndResponsesOnClient(
TEXT("Concert.Replication.LogStreamRequestsAndResponsesOnClient"),
false,
TEXT("Whether to log changes to streams.")
);
TAutoConsoleVariable<bool> CVarLogAuthorityRequestsAndResponsesOnClient(
TEXT("Concert.Replication.LogAuthorityRequestsAndResponsesOnClient"),
false,
#Associated Variable and Callsites
This variable is associated with another variable named CVarLogStreamRequestsAndResponsesOnClient
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/Replication/Manager/ReplicationManagerState_Connected.cpp:43
Scope (from outer to inner):
file
namespace UE::ConcertSyncClient::Replication
Source code excerpt:
);
TAutoConsoleVariable<bool> CVarLogStreamRequestsAndResponsesOnClient(
TEXT("Concert.Replication.LogStreamRequestsAndResponsesOnClient"),
false,
TEXT("Whether to log changes to streams.")
);
TAutoConsoleVariable<bool> CVarLogAuthorityRequestsAndResponsesOnClient(
TEXT("Concert.Replication.LogAuthorityRequestsAndResponsesOnClient"),
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/Replication/Manager/ReplicationManagerState_Connected.cpp:198
Scope (from outer to inner):
file
namespace UE::ConcertSyncClient::Replication
function TFuture<FConcertReplication_ChangeStream_Response> FReplicationManagerState_Connected::ChangeStream
Source code excerpt:
HandleRemovingReplicatedObjects(Args);
Private::LogNetworkMessage(CVarLogStreamRequestsAndResponsesOnClient, Args);
return LiveSession->SendCustomRequest<FConcertReplication_ChangeStream_Request, FConcertReplication_ChangeStream_Response>(Args, LiveSession->GetSessionServerEndpointId())
.Next([WeakThis = TWeakPtr<FReplicationManagerState_Connected>(SharedThis(this)), Args](FConcertReplication_ChangeStream_Response&& Response)
{
Private::LogNetworkMessage(CVarLogStreamRequestsAndResponsesOnClient, Response);
const TSharedPtr<FReplicationManagerState_Connected> ThisPin = WeakThis.Pin();
if (ThisPin && Response.IsSuccess())
{
ThisPin->UpdateReplicatedObjectsAfterStreamChange(Args, Response);
}