From 97b27513e9ecb38e54ee9a20e94b21c330931deb Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Tue, 23 Nov 2021 19:27:16 -0800 Subject: [PATCH 01/11] Editor is now listening to editor-server stdout so adding newlines to lines we care about. (Editor is separating out the log lines based on newline) Signed-off-by: Gene Walters --- .../editor_python_test_tools/utils.py | 4 + .../AutoComponent_NetworkInput.scriptcanvas | 310 +++++++++--------- .../TcpTransport/TcpNetworkInterface.cpp | 2 +- Code/Legacy/CrySystem/SystemInit.cpp | 2 +- .../Editor/MultiplayerEditorConnection.cpp | 5 +- .../Source/MultiplayerSystemComponent.cpp | 2 +- 6 files changed, 164 insertions(+), 161 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py index 481d73274f..d964eb997d 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py @@ -110,9 +110,13 @@ class TestHelper: # make sure the server launcher is running waiter.wait_for(lambda: process_utils.process_exists("AutomatedTesting.ServerLauncher", ignore_extensions=True), timeout=5.0, exc=AssertionError("AutomatedTesting.ServerLauncher has NOT launched!"), interval=1.0) + wait_for_critical_expected_line("(EditorServer) - MultiplayerEditorConnection: Editor-server activation has found and connected to the editor...", section_tracer.prints, 15.0) + # make sure the editor connects to the editor-server and sends the level data packet wait_for_critical_expected_line("Editor is sending the editor-server the level data packet.", section_tracer.prints, 5.0) + wait_for_critical_expected_line("(EditorServer) - MultiplayerEditorConnection: Editor Server completed receiving the editor's level assets, responding to Editor...", section_tracer.prints, 5.0) + # make sure the editor finally connects to the editor-server network simulation wait_for_critical_expected_line("Editor-server ready. Editor has successfully connected to the editor-server's network simulation.", section_tracer.prints, 5.0) diff --git a/AutomatedTesting/Levels/Multiplayer/AutoComponent_NetworkInput/AutoComponent_NetworkInput.scriptcanvas b/AutomatedTesting/Levels/Multiplayer/AutoComponent_NetworkInput/AutoComponent_NetworkInput.scriptcanvas index 2f8a434108..bad28d5417 100644 --- a/AutomatedTesting/Levels/Multiplayer/AutoComponent_NetworkInput/AutoComponent_NetworkInput.scriptcanvas +++ b/AutomatedTesting/Levels/Multiplayer/AutoComponent_NetworkInput/AutoComponent_NetworkInput.scriptcanvas @@ -5,7 +5,7 @@ "ClassData": { "m_scriptCanvas": { "Id": { - "id": 20239954977260 + "id": 11859291537220 }, "Name": "AutoComponent_NetworkInput", "Components": { @@ -81,7 +81,7 @@ "m_nodes": [ { "Id": { - "id": 20265724781036 + "id": 11872176439108 }, "Name": "SC-Node(NotEqualTo)", "Components": { @@ -232,7 +232,7 @@ }, { "Id": { - "id": 20257134846444 + "id": 11893651275588 }, "Name": "SC-Node(NotEqualTo)", "Components": { @@ -383,7 +383,7 @@ }, { "Id": { - "id": 20278609682924 + "id": 11897946242884 }, "Name": "SC-Node(Print)", "Components": { @@ -423,16 +423,16 @@ } } ], - "m_format": "AutoComponent_NetworkInput ProcessInput called!", + "m_format": "AutoComponent_NetworkInput ProcessInput called!\n", "m_unresolvedString": [ - "AutoComponent_NetworkInput ProcessInput called!" + "AutoComponent_NetworkInput ProcessInput called!\n" ] } } }, { "Id": { - "id": 20244249944556 + "id": 11885061340996 }, "Name": "SC-Node(CreateFromValues)", "Components": { @@ -571,7 +571,7 @@ }, { "Id": { - "id": 20252839879148 + "id": 11867881471812 }, "Name": "EBusEventHandler", "Components": { @@ -862,7 +862,7 @@ }, { "Id": { - "id": 20248544911852 + "id": 11863586504516 }, "Name": "SC-Node(ExtractProperty)", "Components": { @@ -1003,7 +1003,7 @@ }, { "Id": { - "id": 20270019748332 + "id": 11880766373700 }, "Name": "SC-Node(Print)", "Components": { @@ -1043,16 +1043,16 @@ } } ], - "m_format": "AutoComponent_NetworkInput received bad fwdback!", + "m_format": "AutoComponent_NetworkInput received bad fwdback!\n", "m_unresolvedString": [ - "AutoComponent_NetworkInput received bad fwdback!" + "AutoComponent_NetworkInput received bad fwdback!\n" ] } } }, { "Id": { - "id": 20274314715628 + "id": 11889356308292 }, "Name": "SC-Node(Print)", "Components": { @@ -1092,16 +1092,16 @@ } } ], - "m_format": "AutoComponent_NetworkInput received bad leftright!", + "m_format": "AutoComponent_NetworkInput received bad leftright!\n", "m_unresolvedString": [ - "AutoComponent_NetworkInput received bad leftright!" + "AutoComponent_NetworkInput received bad leftright!\n" ] } } }, { "Id": { - "id": 20261429813740 + "id": 11876471406404 }, "Name": "SC-Node(Print)", "Components": { @@ -1141,9 +1141,9 @@ } } ], - "m_format": "AutoComponent_NetworkInput CreateInput called!", + "m_format": "AutoComponent_NetworkInput CreateInput called!\n", "m_unresolvedString": [ - "AutoComponent_NetworkInput CreateInput called!" + "AutoComponent_NetworkInput CreateInput called!\n" ] } } @@ -1152,7 +1152,7 @@ "m_connections": [ { "Id": { - "id": 20282904650220 + "id": 11902241210180 }, "Name": "srcEndpoint=(NetworkTestPlayerComponentBusHandler Handler: ExecutionSlot:CreateInput), destEndpoint=(Print: In)", "Components": { @@ -1161,7 +1161,7 @@ "Id": 3586317167340048684, "sourceEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{B831AC60-7641-4B74-9829-26A3576B4766}" @@ -1169,7 +1169,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20261429813740 + "id": 11876471406404 }, "slotId": { "m_id": "{2B6DB3BC-AA87-4280-B4C3-42C1EE17CBA3}" @@ -1180,7 +1180,7 @@ }, { "Id": { - "id": 20287199617516 + "id": 11906536177476 }, "Name": "srcEndpoint=(NetworkTestPlayerComponentBusHandler Handler: ExecutionSlot:CreateInput), destEndpoint=(CreateFromValues: In)", "Components": { @@ -1189,7 +1189,7 @@ "Id": 15956251897822268937, "sourceEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{B831AC60-7641-4B74-9829-26A3576B4766}" @@ -1197,7 +1197,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20244249944556 + "id": 11885061340996 }, "slotId": { "m_id": "{514CDDAA-290F-4758-B28F-4003E719E635}" @@ -1208,7 +1208,7 @@ }, { "Id": { - "id": 20291494584812 + "id": 11910831144772 }, "Name": "srcEndpoint=(CreateFromValues: Result: NetworkTestPlayerComponentNetworkInput), destEndpoint=(NetworkTestPlayerComponentBusHandler Handler: Result: NetworkTestPlayerComponentNetworkInput)", "Components": { @@ -1217,7 +1217,7 @@ "Id": 3864080489501353126, "sourceEndpoint": { "nodeId": { - "id": 20244249944556 + "id": 11885061340996 }, "slotId": { "m_id": "{90E52F81-54E0-4C63-9881-B661FB5D87D1}" @@ -1225,7 +1225,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{ADF9B366-8324-4C1E-B601-C059DA70FDDE}" @@ -1236,7 +1236,7 @@ }, { "Id": { - "id": 20295789552108 + "id": 11915126112068 }, "Name": "srcEndpoint=(NetworkTestPlayerComponentBusHandler Handler: ExecutionSlot:ProcessInput), destEndpoint=(Print: In)", "Components": { @@ -1245,7 +1245,7 @@ "Id": 8628095809445337119, "sourceEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{4C8F2908-12B0-4C35-8468-31D3D4DF36AA}" @@ -1253,7 +1253,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20278609682924 + "id": 11897946242884 }, "slotId": { "m_id": "{D994D58A-DBF1-4929-B779-F0D2CBAD2F0D}" @@ -1264,7 +1264,7 @@ }, { "Id": { - "id": 20300084519404 + "id": 11919421079364 }, "Name": "srcEndpoint=(NetworkTestPlayerComponentBusHandler Handler: ExecutionSlot:ProcessInput), destEndpoint=(Extract Properties: In)", "Components": { @@ -1273,7 +1273,7 @@ "Id": 10621112306443381493, "sourceEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{4C8F2908-12B0-4C35-8468-31D3D4DF36AA}" @@ -1281,7 +1281,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{C80C50EE-F216-4F44-B107-6B35354AFD52}" @@ -1292,7 +1292,7 @@ }, { "Id": { - "id": 20304379486700 + "id": 11923716046660 }, "Name": "srcEndpoint=(NetworkTestPlayerComponentBusHandler Handler: NetworkTestPlayerComponentNetworkInput), destEndpoint=(Extract Properties: Source)", "Components": { @@ -1301,7 +1301,7 @@ "Id": 14013500888143163469, "sourceEndpoint": { "nodeId": { - "id": 20252839879148 + "id": 11867881471812 }, "slotId": { "m_id": "{8F69FA2E-28D8-4DF1-A4B5-AEF3985095C5}" @@ -1309,7 +1309,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{D387C800-352B-4B01-8765-4F4B40DF45CB}" @@ -1320,7 +1320,7 @@ }, { "Id": { - "id": 20308674453996 + "id": 11928011013956 }, "Name": "srcEndpoint=(Extract Properties: Out), destEndpoint=(Not Equal To (!=): In)", "Components": { @@ -1329,7 +1329,7 @@ "Id": 14597948098713219792, "sourceEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{C69C098D-D667-4DC7-85E5-AFD119727D94}" @@ -1337,7 +1337,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20257134846444 + "id": 11893651275588 }, "slotId": { "m_id": "{AE7E453C-15DE-47D2-954A-05C3895B7AC6}" @@ -1348,7 +1348,7 @@ }, { "Id": { - "id": 20312969421292 + "id": 11932305981252 }, "Name": "srcEndpoint=(Extract Properties: FwdBack: Number), destEndpoint=(Not Equal To (!=): Value A)", "Components": { @@ -1357,7 +1357,7 @@ "Id": 14915522756837814768, "sourceEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{0C03D491-DE25-46C2-BF09-14769FA49FDB}" @@ -1365,7 +1365,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20257134846444 + "id": 11893651275588 }, "slotId": { "m_id": "{57EBC15B-452E-49B3-8BD3-4FBBB07F1F14}" @@ -1376,7 +1376,7 @@ }, { "Id": { - "id": 20317264388588 + "id": 11936600948548 }, "Name": "srcEndpoint=(Extract Properties: Out), destEndpoint=(Not Equal To (!=): In)", "Components": { @@ -1385,7 +1385,7 @@ "Id": 6510282773353837676, "sourceEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{C69C098D-D667-4DC7-85E5-AFD119727D94}" @@ -1393,7 +1393,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20265724781036 + "id": 11872176439108 }, "slotId": { "m_id": "{AE7E453C-15DE-47D2-954A-05C3895B7AC6}" @@ -1404,7 +1404,7 @@ }, { "Id": { - "id": 20321559355884 + "id": 11940895915844 }, "Name": "srcEndpoint=(Extract Properties: LeftRight: Number), destEndpoint=(Not Equal To (!=): Value A)", "Components": { @@ -1413,7 +1413,7 @@ "Id": 16150645152204311425, "sourceEndpoint": { "nodeId": { - "id": 20248544911852 + "id": 11863586504516 }, "slotId": { "m_id": "{4C13F9EF-60BF-4AD1-8FA9-66F46455411C}" @@ -1421,7 +1421,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20265724781036 + "id": 11872176439108 }, "slotId": { "m_id": "{57EBC15B-452E-49B3-8BD3-4FBBB07F1F14}" @@ -1432,7 +1432,7 @@ }, { "Id": { - "id": 20325854323180 + "id": 11945190883140 }, "Name": "srcEndpoint=(Not Equal To (!=): True), destEndpoint=(Print: In)", "Components": { @@ -1441,7 +1441,7 @@ "Id": 3322355580364572639, "sourceEndpoint": { "nodeId": { - "id": 20257134846444 + "id": 11893651275588 }, "slotId": { "m_id": "{AC364E17-A9A1-42DB-A29D-7B2D666E4287}" @@ -1449,7 +1449,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20270019748332 + "id": 11880766373700 }, "slotId": { "m_id": "{733AA75D-022C-45E9-9D0F-3EF9A1633ADC}" @@ -1460,7 +1460,7 @@ }, { "Id": { - "id": 20330149290476 + "id": 11949485850436 }, "Name": "srcEndpoint=(Not Equal To (!=): True), destEndpoint=(Print: In)", "Components": { @@ -1469,7 +1469,7 @@ "Id": 1975626970668030308, "sourceEndpoint": { "nodeId": { - "id": 20265724781036 + "id": 11872176439108 }, "slotId": { "m_id": "{AC364E17-A9A1-42DB-A29D-7B2D666E4287}" @@ -1477,7 +1477,7 @@ }, "targetEndpoint": { "nodeId": { - "id": 20274314715628 + "id": 11889356308292 }, "slotId": { "m_id": "{733AA75D-022C-45E9-9D0F-3EF9A1633ADC}" @@ -1498,16 +1498,16 @@ "GraphCanvasData": [ { "Key": { - "id": 20239954977260 + "id": 11859291537220 }, "Value": { "ComponentData": { "{5F84B500-8C45-40D1-8EFC-A5306B241444}": { "$type": "SceneComponentSaveData", "ViewParams": { - "Scale": 1.0097068678919363, - "AnchorX": 1086.4539794921875, - "AnchorY": 198.07728576660156 + "Scale": 0.8416459517191037, + "AnchorX": -80.7940673828125, + "AnchorY": -622.589599609375 } } } @@ -1515,38 +1515,7 @@ }, { "Key": { - "id": 20244249944556 - }, - "Value": { - "ComponentData": { - "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { - "$type": "NodeSaveData" - }, - "{328FF15C-C302-458F-A43D-E1794DE0904E}": { - "$type": "GeneralNodeTitleComponentSaveData", - "PaletteOverride": "MethodNodeTitlePalette" - }, - "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { - "$type": "GeometrySaveData", - "Position": [ - 740.0, - 100.0 - ] - }, - "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { - "$type": "StylingComponentSaveData", - "SubStyle": ".method" - }, - "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { - "$type": "PersistentIdComponentSaveData", - "PersistentId": "{7A7C96CB-4B5A-48DD-A0AD-0094A113549B}" - } - } - } - }, - { - "Key": { - "id": 20248544911852 + "id": 11863586504516 }, "Value": { "ComponentData": { @@ -1576,7 +1545,7 @@ }, { "Key": { - "id": 20252839879148 + "id": 11867881471812 }, "Value": { "ComponentData": { @@ -1613,67 +1582,7 @@ }, { "Key": { - "id": 20257134846444 - }, - "Value": { - "ComponentData": { - "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { - "$type": "NodeSaveData" - }, - "{328FF15C-C302-458F-A43D-E1794DE0904E}": { - "$type": "GeneralNodeTitleComponentSaveData", - "PaletteOverride": "MathNodeTitlePalette" - }, - "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { - "$type": "GeometrySaveData", - "Position": [ - 1040.0, - 320.0 - ] - }, - "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { - "$type": "StylingComponentSaveData" - }, - "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { - "$type": "PersistentIdComponentSaveData", - "PersistentId": "{71AB4748-41F4-4FEA-874C-F54037236F31}" - } - } - } - }, - { - "Key": { - "id": 20261429813740 - }, - "Value": { - "ComponentData": { - "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { - "$type": "NodeSaveData" - }, - "{328FF15C-C302-458F-A43D-E1794DE0904E}": { - "$type": "GeneralNodeTitleComponentSaveData", - "PaletteOverride": "StringNodeTitlePalette" - }, - "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { - "$type": "GeometrySaveData", - "Position": [ - 740.0, - -100.0 - ] - }, - "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { - "$type": "StylingComponentSaveData" - }, - "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { - "$type": "PersistentIdComponentSaveData", - "PersistentId": "{26E363EE-F35A-4096-88EF-DF907A809894}" - } - } - } - }, - { - "Key": { - "id": 20265724781036 + "id": 11872176439108 }, "Value": { "ComponentData": { @@ -1703,7 +1612,37 @@ }, { "Key": { - "id": 20270019748332 + "id": 11876471406404 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "StringNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 740.0, + -100.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{26E363EE-F35A-4096-88EF-DF907A809894}" + } + } + } + }, + { + "Key": { + "id": 11880766373700 }, "Value": { "ComponentData": { @@ -1733,7 +1672,38 @@ }, { "Key": { - "id": 20274314715628 + "id": 11885061340996 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MethodNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 740.0, + 100.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData", + "SubStyle": ".method" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{7A7C96CB-4B5A-48DD-A0AD-0094A113549B}" + } + } + } + }, + { + "Key": { + "id": 11889356308292 }, "Value": { "ComponentData": { @@ -1763,7 +1733,37 @@ }, { "Key": { - "id": 20278609682924 + "id": 11893651275588 + }, + "Value": { + "ComponentData": { + "{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": { + "$type": "NodeSaveData" + }, + "{328FF15C-C302-458F-A43D-E1794DE0904E}": { + "$type": "GeneralNodeTitleComponentSaveData", + "PaletteOverride": "MathNodeTitlePalette" + }, + "{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": { + "$type": "GeometrySaveData", + "Position": [ + 1040.0, + 320.0 + ] + }, + "{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": { + "$type": "StylingComponentSaveData" + }, + "{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": { + "$type": "PersistentIdComponentSaveData", + "PersistentId": "{71AB4748-41F4-4FEA-874C-F54037236F31}" + } + } + } + }, + { + "Key": { + "id": 11897946242884 }, "Value": { "ComponentData": { diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp index 18ce25c4dd..6fa720f296 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp @@ -92,7 +92,7 @@ namespace AzNetworking return InvalidConnectionId; } - AZLOG_INFO("Adding new socket %d", static_cast(tcpSocket->GetSocketFd())); + AZLOG_INFO("Adding new socket %d\n", static_cast(tcpSocket->GetSocketFd())); connection->SendReliablePacket(CorePackets::InitiateConnectionPacket()); m_connectionListener.OnConnect(connection.get()); m_connectionSet.AddConnection(AZStd::move(connection)); diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index c5039f57e9..c0c8607935 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -1072,7 +1072,7 @@ AZ_POP_DISABLE_WARNING { m_pUserCallback->OnInitProgress("Initializing additional systems..."); } - AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Initializing additional systems"); + AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Initializing additional systems\n"); InlineInitializationProcessing("CSystem::Init AIInit"); diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp index b896f35b71..3011b2dcad 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp @@ -81,7 +81,7 @@ namespace Multiplayer else { m_networkEditorInterface->SendReliablePacket(editorServerToEditorConnectionId, MultiplayerEditorPackets::EditorServerReadyForLevelData()); - AZ_Printf("MultiplayerEditorConnection", "Editor-server activation has found and connected to the editor.") + AZ_Printf("MultiplayerEditorConnection", "Editor-server activation has found and connected to the editor.\n") } } @@ -160,8 +160,7 @@ namespace Multiplayer } networkInterface->Listen(sv_port); - - AZLOG_INFO("Editor Server completed receiving the editor's level assets, responding to Editor..."); + AZ_Printf("MultiplayerEditorConnection", "Editor Server completed receiving the editor's level assets, responding to Editor...\n") return connection->SendReliablePacket(MultiplayerEditorPackets::EditorServerReady()); } diff --git a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp index 503a8128b0..0f70218532 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp @@ -857,7 +857,7 @@ namespace Multiplayer EnableAutonomousControl(controlledEntity, AzNetworking::InvalidConnectionId); } - AZLOG_INFO("Multiplayer operating in %s mode", GetEnumString(m_agentType)); + AZLOG_INFO("Multiplayer operating in %s mode\n", GetEnumString(m_agentType)); } void MultiplayerSystemComponent::AddClientMigrationStartEventHandler(ClientMigrationStartEvent::Handler& handler) From 75e8ef808983071f91e1154ea0b920ccf13b8332 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Mon, 29 Nov 2021 13:36:41 -0800 Subject: [PATCH 02/11] Misc cleanup. Making sure ServerLauncher closes if tests fail Signed-off-by: Gene Walters --- .../EditorPythonTestTools/editor_python_test_tools/utils.py | 6 ++---- .../Gem/PythonTests/automatedtesting_shared/base.py | 2 +- .../Code/Source/Editor/MultiplayerEditorSystemComponent.cpp | 4 ---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py index d964eb997d..e0b243a34f 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py @@ -110,14 +110,12 @@ class TestHelper: # make sure the server launcher is running waiter.wait_for(lambda: process_utils.process_exists("AutomatedTesting.ServerLauncher", ignore_extensions=True), timeout=5.0, exc=AssertionError("AutomatedTesting.ServerLauncher has NOT launched!"), interval=1.0) - wait_for_critical_expected_line("(EditorServer) - MultiplayerEditorConnection: Editor-server activation has found and connected to the editor...", section_tracer.prints, 15.0) + wait_for_critical_expected_line("MultiplayerEditorConnection: Editor-server activation has found and connected to the editor.", section_tracer.prints, 15.0) - # make sure the editor connects to the editor-server and sends the level data packet wait_for_critical_expected_line("Editor is sending the editor-server the level data packet.", section_tracer.prints, 5.0) - wait_for_critical_expected_line("(EditorServer) - MultiplayerEditorConnection: Editor Server completed receiving the editor's level assets, responding to Editor...", section_tracer.prints, 5.0) + wait_for_critical_expected_line("MultiplayerEditorConnection: Editor Server completed receiving the editor's level assets, responding to Editor...", section_tracer.prints, 5.0) - # make sure the editor finally connects to the editor-server network simulation wait_for_critical_expected_line("Editor-server ready. Editor has successfully connected to the editor-server's network simulation.", section_tracer.prints, 5.0) TestHelper.wait_for_condition(lambda : multiplayer.PythonEditorFuncs_is_in_game_mode(), 5.0) diff --git a/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py b/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py index 4543888a7c..18334d9311 100755 --- a/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py +++ b/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py @@ -177,7 +177,7 @@ class TestAutomationBase: @staticmethod def _kill_ly_processes(include_asset_processor=True): LY_PROCESSES = [ - 'Editor', 'Profiler', 'RemoteConsole', + 'Editor', 'Profiler', 'RemoteConsole', 'AutomatedTesting.ServerLauncher' ] AP_PROCESSES = [ 'AssetProcessor', 'AssetProcessorBatch', 'AssetBuilder', 'CrySCompileServer', diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp index 7cc6fbc1b5..677a486097 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp @@ -6,7 +6,6 @@ * */ -#include "AzFramework/Process/ProcessCommunicator.h" #include #include @@ -16,11 +15,8 @@ #include #include #include -#include -#include #include -#include #include #include #include From f4e762d9bd99c20096c33e22cbd1c7029e0e1171 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Mon, 29 Nov 2021 16:36:28 -0800 Subject: [PATCH 03/11] Adding warning if server fails to load the sv_defaultPlayerSpawnAsset when a client joins the server. Updating Multiplayer PyTest to watch out for this warning. Signed-off-by: Gene Walters --- .../editor_python_test_tools/utils.py | 2 ++ Code/Legacy/CrySystem/AZCoreLogSink.h | 2 +- .../Code/Source/MultiplayerSystemComponent.cpp | 8 +++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py index e0b243a34f..26cc67b709 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py @@ -118,6 +118,8 @@ class TestHelper: wait_for_critical_expected_line("Editor-server ready. Editor has successfully connected to the editor-server's network simulation.", section_tracer.prints, 5.0) + wait_for_critical_unexpected_line(f"MultiplayerSystemComponent: SpawnDefaultPlayerPrefab failed. Missing sv_defaultPlayerSpawnAsset at path '{sv_default_player_spawn_asset.lower()}'.", section_tracer.prints, 0.5) + TestHelper.wait_for_condition(lambda : multiplayer.PythonEditorFuncs_is_in_game_mode(), 5.0) Report.critical_result(msgtuple_success_fail, multiplayer.PythonEditorFuncs_is_in_game_mode()) diff --git a/Code/Legacy/CrySystem/AZCoreLogSink.h b/Code/Legacy/CrySystem/AZCoreLogSink.h index 39a6131262..ad9c09a8b9 100644 --- a/Code/Legacy/CrySystem/AZCoreLogSink.h +++ b/Code/Legacy/CrySystem/AZCoreLogSink.h @@ -162,7 +162,7 @@ public: } CryWarning(VALIDATOR_MODULE_UNKNOWN, VALIDATOR_WARNING, "(%s) - %s", window, message); - return true; // suppress default AzCore behavior. + return m_suppressSystemOutput; } bool OnOutput(const char* window, const char* message) override diff --git a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp index 0f70218532..7340bde704 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp @@ -1135,9 +1135,15 @@ namespace Multiplayer // make sure the player prefab path is lowercase (how it's stored in the cache folder) auto sv_defaultPlayerSpawnAssetLowerCase = static_cast(sv_defaultPlayerSpawnAsset); AZStd::to_lower(sv_defaultPlayerSpawnAssetLowerCase.begin(), sv_defaultPlayerSpawnAssetLowerCase.end()); - PrefabEntityId playerPrefabEntityId(AZ::Name(static_cast(sv_defaultPlayerSpawnAssetLowerCase).c_str())); + PrefabEntityId playerPrefabEntityId(AZ::Name(sv_defaultPlayerSpawnAssetLowerCase.c_str())); + INetworkEntityManager::EntityList entityList = m_networkEntityManager.CreateEntitiesImmediate(playerPrefabEntityId, NetEntityRole::Authority, AZ::Transform::CreateIdentity(), Multiplayer::AutoActivate::DoNotActivate); + AZ_Warning( + "MultiplayerSystemComponent", !entityList.empty(), + "SpawnDefaultPlayerPrefab failed. Missing sv_defaultPlayerSpawnAsset at path '%s'.\n", + sv_defaultPlayerSpawnAssetLowerCase.c_str()) + for (NetworkEntityHandle subEntity : entityList) { subEntity.Activate(); From c8b631054fc78386e08921e2b18b7fba014bd550 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Wed, 1 Dec 2021 10:04:26 -0800 Subject: [PATCH 04/11] Misc edit to keep an AZLOG_INFO instead of AZPrint. No real difference, but good as an example for pytest Signed-off-by: Gene Walters --- .../EditorPythonTestTools/editor_python_test_tools/utils.py | 2 +- .../Code/Source/Editor/MultiplayerEditorConnection.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py index 26cc67b709..e0411f5380 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py @@ -114,7 +114,7 @@ class TestHelper: wait_for_critical_expected_line("Editor is sending the editor-server the level data packet.", section_tracer.prints, 5.0) - wait_for_critical_expected_line("MultiplayerEditorConnection: Editor Server completed receiving the editor's level assets, responding to Editor...", section_tracer.prints, 5.0) + wait_for_critical_expected_line("Logger: Editor Server completed receiving the editor's level assets, responding to Editor...", section_tracer.prints, 5.0) wait_for_critical_expected_line("Editor-server ready. Editor has successfully connected to the editor-server's network simulation.", section_tracer.prints, 5.0) diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp index 3011b2dcad..33d52dcc66 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp @@ -160,7 +160,8 @@ namespace Multiplayer } networkInterface->Listen(sv_port); - AZ_Printf("MultiplayerEditorConnection", "Editor Server completed receiving the editor's level assets, responding to Editor...\n") + + AZLOG_INFO("Editor Server completed receiving the editor's level assets, responding to Editor...\n") return connection->SendReliablePacket(MultiplayerEditorPackets::EditorServerReady()); } From b2629091172cd42a5f9852a6bad84c9e11318dcf Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Wed, 1 Dec 2021 10:06:04 -0800 Subject: [PATCH 05/11] Misc whitespace edit Signed-off-by: Gene Walters --- .../Code/Source/Editor/MultiplayerEditorConnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp index 33d52dcc66..a245bc0cca 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp @@ -160,7 +160,7 @@ namespace Multiplayer } networkInterface->Listen(sv_port); - + AZLOG_INFO("Editor Server completed receiving the editor's level assets, responding to Editor...\n") return connection->SendReliablePacket(MultiplayerEditorPackets::EditorServerReady()); } From efcbc7ccd731d1cd2f2c50b5663a47a6dfadba6d Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Thu, 2 Dec 2021 14:36:41 -0800 Subject: [PATCH 06/11] Removing code which was supposed to add a newline, but never did. The comment said it was required because of an assumption with Trace, but clearly Trace doesn't make that assumption Signed-off-by: Gene Walters --- Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp index 4d00443186..edff76f827 100644 --- a/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp @@ -125,8 +125,6 @@ namespace AZ buffer[AZStd::min(length + 1, MaxLogBufferSize - 1)] = '\0'; m_logEvent.Signal(level, buffer, file, function, line); - // Force a new-line before calling the AZ::Debug::Trace functions, as they assume a newline is present - buffer[AZStd::min(length + 1, MaxLogBufferSize - 2)] = '\n'; switch (level) { case LogLevel::Warn: From d4e7a9cf16de074f4bbea7c284ac97a9f1a04696 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Thu, 2 Dec 2021 14:41:24 -0800 Subject: [PATCH 07/11] Removing adding the null-terminator by hand. _vsnprintf_s already does this. Even if the buffer is too small, the /0 is still at the end Signed-off-by: Gene Walters --- Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp index edff76f827..1feb93c52a 100644 --- a/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp @@ -122,7 +122,6 @@ namespace AZ char buffer[MaxLogBufferSize]; const AZStd::size_t length = azvsnprintf(buffer, MaxLogBufferSize, format, args); - buffer[AZStd::min(length + 1, MaxLogBufferSize - 1)] = '\0'; m_logEvent.Signal(level, buffer, file, function, line); switch (level) From e2d1cdc9a5da110c306e2225bde1601ee2de31ec Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Fri, 3 Dec 2021 10:07:28 -0800 Subject: [PATCH 08/11] Update Logger to use fixed_string Signed-off-by: Gene Walters --- .../AzCore/AzCore/Console/LoggerSystemComponent.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp index 1feb93c52a..6406f5924b 100644 --- a/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp @@ -119,22 +119,21 @@ namespace AZ void LoggerSystemComponent::LogInternalV(LogLevel level, const char* format, const char* file, const char* function, int32_t line, va_list args) { constexpr AZStd::size_t MaxLogBufferSize = 1000; - char buffer[MaxLogBufferSize]; + auto buffer = AZStd::fixed_string::format_arg(format, args); - const AZStd::size_t length = azvsnprintf(buffer, MaxLogBufferSize, format, args); - m_logEvent.Signal(level, buffer, file, function, line); + m_logEvent.Signal(level, buffer.c_str(), file, function, line); switch (level) { case LogLevel::Warn: - AZ_Warning("Logger", true, buffer); + AZ_Warning("Logger", true, buffer.c_str()); break; case LogLevel::Error: - AZ_Error("Logger", true, buffer); + AZ_Error("Logger", true, buffer.c_str()); break; default: // Catch all else with trace - AZ::Debug::Trace::Output("Logger", buffer); + AZ::Debug::Trace::Output("Logger", buffer.c_str()); break; } } From b123379380bce05bed51e1714a321b5b945c05f5 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Tue, 7 Dec 2021 14:53:59 -0800 Subject: [PATCH 09/11] Properly adding newlines when using LogInternalV; removing the need of hand-placed newlines to AZ_LOG Signed-off-by: Gene Walters --- Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp | 2 +- .../AzNetworking/TcpTransport/TcpNetworkInterface.cpp | 2 +- .../Code/Source/Editor/MultiplayerEditorConnection.cpp | 2 +- Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp index 6406f5924b..2794dfdc40 100644 --- a/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Console/LoggerSystemComponent.cpp @@ -120,8 +120,8 @@ namespace AZ { constexpr AZStd::size_t MaxLogBufferSize = 1000; auto buffer = AZStd::fixed_string::format_arg(format, args); - m_logEvent.Signal(level, buffer.c_str(), file, function, line); + buffer += '\n'; switch (level) { diff --git a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp index 6fa720f296..18ce25c4dd 100644 --- a/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp +++ b/Code/Framework/AzNetworking/AzNetworking/TcpTransport/TcpNetworkInterface.cpp @@ -92,7 +92,7 @@ namespace AzNetworking return InvalidConnectionId; } - AZLOG_INFO("Adding new socket %d\n", static_cast(tcpSocket->GetSocketFd())); + AZLOG_INFO("Adding new socket %d", static_cast(tcpSocket->GetSocketFd())); connection->SendReliablePacket(CorePackets::InitiateConnectionPacket()); m_connectionListener.OnConnect(connection.get()); m_connectionSet.AddConnection(AZStd::move(connection)); diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp index a245bc0cca..d3489b6e4e 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp @@ -161,7 +161,7 @@ namespace Multiplayer networkInterface->Listen(sv_port); - AZLOG_INFO("Editor Server completed receiving the editor's level assets, responding to Editor...\n") + AZLOG_INFO("Editor Server completed receiving the editor's level assets, responding to Editor...") return connection->SendReliablePacket(MultiplayerEditorPackets::EditorServerReady()); } diff --git a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp index 7340bde704..dcad230f71 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerSystemComponent.cpp @@ -857,7 +857,7 @@ namespace Multiplayer EnableAutonomousControl(controlledEntity, AzNetworking::InvalidConnectionId); } - AZLOG_INFO("Multiplayer operating in %s mode\n", GetEnumString(m_agentType)); + AZLOG_INFO("Multiplayer operating in %s mode", GetEnumString(m_agentType)); } void MultiplayerSystemComponent::AddClientMigrationStartEventHandler(ClientMigrationStartEvent::Handler& handler) From f97707a28a412b4cb24d25c43d0de09ae46248ec Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Tue, 7 Dec 2021 16:14:08 -0800 Subject: [PATCH 10/11] Removing hand-written /n from all AZLOG_ now that we properly add \n automatically Signed-off-by: Gene Walters --- Code/Framework/AzCore/AzCore/Console/Console.cpp | 14 +++++++------- .../Code/Source/BarrierInputClient.cpp | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Console/Console.cpp b/Code/Framework/AzCore/AzCore/Console/Console.cpp index d6781e1370..ff7a08e127 100644 --- a/Code/Framework/AzCore/AzCore/Console/Console.cpp +++ b/Code/Framework/AzCore/AzCore/Console/Console.cpp @@ -243,7 +243,7 @@ namespace AZ if (StringFunc::StartsWith(curr->m_name, command, false)) { - AZLOG_INFO("- %s : %s\n", curr->m_name, curr->m_desc); + AZLOG_INFO("- %s : %s", curr->m_name, curr->m_desc); if (commandSubset.size() < MaxConsoleCommandPlusArgsLength) { @@ -433,29 +433,29 @@ namespace AZ { if ((curr->GetFlags() & requiredSet) != requiredSet) { - AZLOG_WARN("%s failed required set flag check\n", curr->m_name); + AZLOG_WARN("%s failed required set flag check", curr->m_name); continue; } if ((curr->GetFlags() & requiredClear) != ConsoleFunctorFlags::Null) { - AZLOG_WARN("%s failed required clear flag check\n", curr->m_name); + AZLOG_WARN("%s failed required clear flag check", curr->m_name); continue; } if ((curr->GetFlags() & ConsoleFunctorFlags::IsCheat) != ConsoleFunctorFlags::Null) { - AZLOG_WARN("%s is marked as a cheat\n", curr->m_name); + AZLOG_WARN("%s is marked as a cheat", curr->m_name); } if ((curr->GetFlags() & ConsoleFunctorFlags::IsDeprecated) != ConsoleFunctorFlags::Null) { - AZLOG_WARN("%s is marked as deprecated\n", curr->m_name); + AZLOG_WARN("%s is marked as deprecated", curr->m_name); } if ((curr->GetFlags() & ConsoleFunctorFlags::NeedsReload) != ConsoleFunctorFlags::Null) { - AZLOG_WARN("Changes to %s will only take effect after level reload\n", curr->m_name); + AZLOG_WARN("Changes to %s will only take effect after level reload", curr->m_name); } // Letting this intentionally fall-through, since in editor we can register common variables multiple times @@ -468,7 +468,7 @@ namespace AZ { CVarFixedString value; curr->GetValue(value); - AZLOG_INFO("> %s : %s\n", curr->GetName(), value.empty() ? "" : value.c_str()); + AZLOG_INFO("> %s : %s", curr->GetName(), value.empty() ? "" : value.c_str()); } flags = curr->GetFlags(); } diff --git a/Gems/BarrierInput/Code/Source/BarrierInputClient.cpp b/Gems/BarrierInput/Code/Source/BarrierInputClient.cpp index ec4cbcfbd1..f564a0c1bc 100644 --- a/Gems/BarrierInput/Code/Source/BarrierInputClient.cpp +++ b/Gems/BarrierInput/Code/Source/BarrierInputClient.cpp @@ -254,7 +254,7 @@ namespace BarrierInput static bool barrierBye([[maybe_unused]]BarrierClient* pContext, [[maybe_unused]]int* pArgs, [[maybe_unused]]Stream* pStream, [[maybe_unused]]int streamLeft) { - AZLOG_INFO("BarrierClient: Server said bye. Disconnecting\n"); + AZLOG_INFO("BarrierClient: Server said bye. Disconnecting"); return false; } @@ -284,7 +284,7 @@ namespace BarrierInput const char* packetStart = stream.GetData(); if (packetLength > streamLength) { - AZLOG_INFO("BarrierClient: Packet overruns buffer (Packet Length: %d Buffer Length: %d), probably lots of data on clipboard?\n", packetLength, streamLength); + AZLOG_INFO("BarrierClient: Packet overruns buffer (Packet Length: %d Buffer Length: %d), probably lots of data on clipboard?", packetLength, streamLength); return false; } @@ -377,7 +377,7 @@ namespace BarrierInput const int lengthReceived = AZ::AzSock::Recv(m_socket, stream.GetBuffer(), stream.GetBufferSize(), 0); if (lengthReceived <= 0) { - AZLOG_INFO("BarrierClient: Receive failed, reconnecting.\n"); + AZLOG_INFO("BarrierClient: Receive failed, reconnecting."); connected = false; continue; } @@ -386,7 +386,7 @@ namespace BarrierInput stream.SetLength(lengthReceived); if (!ProcessPackets(this, stream)) { - AZLOG_INFO("BarrierClient: Packet processing failed, reconnecting.\n"); + AZLOG_INFO("BarrierClient: Packet processing failed, reconnecting."); connected = false; continue; } From 1983e94580437b8f20dd68893ddb6a59c59f84f2 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Tue, 7 Dec 2021 16:27:23 -0800 Subject: [PATCH 11/11] Minor tweak to re-add ';' to LOG Signed-off-by: Gene Walters --- .../Code/Source/Editor/MultiplayerEditorConnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp index d3489b6e4e..66b14579fa 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorConnection.cpp @@ -161,7 +161,7 @@ namespace Multiplayer networkInterface->Listen(sv_port); - AZLOG_INFO("Editor Server completed receiving the editor's level assets, responding to Editor...") + AZLOG_INFO("Editor Server completed receiving the editor's level assets, responding to Editor..."); return connection->SendReliablePacket(MultiplayerEditorPackets::EditorServerReady()); }