Skip to content

Commit 9d6ebc7

Browse files
committed
reduce logging
1 parent 287a238 commit 9d6ebc7

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

  • GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline

GeneralsMD/Code/GameEngine/Source/GameNetwork/GeneralsOnline/NetworkMesh.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,16 @@ NetworkMesh::NetworkMesh()
524524

525525
SteamNetworkingUtils()->SetGlobalCallback_SteamNetConnectionStatusChanged(OnSteamNetConnectionStatusChanged);
526526

527+
ESteamNetworkingSocketsDebugOutputType logType =
528+
#if defined(_DEBUG)
529+
ESteamNetworkingSocketsDebugOutputType::k_ESteamNetworkingSocketsDebugOutputType_Debug
530+
#else
531+
ESteamNetworkingSocketsDebugOutputType::k_ESteamNetworkingSocketsDebugOutputType_Msg
532+
#endif
533+
;
527534

528-
SteamNetworkingUtils()->SetGlobalConfigValueInt32(k_ESteamNetworkingConfig_LogLevel_P2PRendezvous, k_ESteamNetworkingSocketsDebugOutputType_Debug);
529-
SteamNetworkingUtils()->SetDebugOutputFunction(ESteamNetworkingSocketsDebugOutputType::k_ESteamNetworkingSocketsDebugOutputType_Debug, [](ESteamNetworkingSocketsDebugOutputType nType, const char* pszMsg)
535+
SteamNetworkingUtils()->SetGlobalConfigValueInt32(k_ESteamNetworkingConfig_LogLevel_P2PRendezvous, logType);
536+
SteamNetworkingUtils()->SetDebugOutputFunction(logType, [](ESteamNetworkingSocketsDebugOutputType nType, const char* pszMsg)
530537
{
531538
NetworkLog(ELogVerbosity::LOG_RELEASE, "[STEAM NETWORKING LOGFUNC] %s", pszMsg);
532539
});

0 commit comments

Comments
 (0)