Merge pull request #6066 from aws-lumberyard-dev/LYN-8514_AutomatedReviewServerLogChecks

Updating Multiplayer PyTests To Check Server Logs
This commit is contained in:
Gene Walters
2021-12-09 09:15:58 -08:00
committed by GitHub
9 changed files with 188 additions and 182 deletions
@@ -140,12 +140,16 @@ 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)
# make sure the editor connects to the editor-server and sends the level data packet
wait_for_critical_expected_line("MultiplayerEditorConnection: Editor-server activation has found and connected to the editor.", section_tracer.prints, 15.0)
wait_for_critical_expected_line("Editor is sending the editor-server the level data packet.", section_tracer.prints, 5.0)
# make sure the editor finally connects to the editor-server network simulation
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)
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())
@@ -178,7 +178,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',
@@ -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": {
@@ -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() ? "<empty>" : value.c_str());
AZLOG_INFO("> %s : %s", curr->GetName(), value.empty() ? "<empty>" : value.c_str());
}
flags = curr->GetFlags();
}
@@ -119,25 +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<MaxLogBufferSize>::format_arg(format, args);
m_logEvent.Signal(level, buffer.c_str(), file, function, line);
buffer += '\n';
const AZStd::size_t length = azvsnprintf(buffer, MaxLogBufferSize, format, args);
buffer[AZStd::min<AZStd::size_t>(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<AZStd::size_t>(length + 1, MaxLogBufferSize - 2)] = '\n';
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;
}
}
+1 -1
View File
@@ -1080,7 +1080,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");
@@ -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;
}
@@ -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")
}
}
@@ -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<AZ::CVarFixedString>(sv_defaultPlayerSpawnAsset);
AZStd::to_lower(sv_defaultPlayerSpawnAssetLowerCase.begin(), sv_defaultPlayerSpawnAssetLowerCase.end());
PrefabEntityId playerPrefabEntityId(AZ::Name(static_cast<AZ::CVarFixedString>(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();