Skip to content

Commit ae22678

Browse files
committed
Fix log lines in test
1 parent f051078 commit ae22678

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

com.unity.netcode.gameobjects/Runtime/Logging/ContextualLogger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ private void Log(LogType logType, Context context)
136136
private void LogServer(LogType logType, Context context)
137137
{
138138
// Don't act if the configured logging level is higher than the level of this log
139-
if (m_ManagerContext.LogLevel <= context.Level)
139+
if (m_ManagerContext.LogLevel > context.Level)
140140
{
141141
return;
142142
}

com.unity.netcode.gameobjects/Tests/Runtime/DistributedAuthority/OwnershipPermissionsTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections;
33
using System.Collections.Generic;
44
using System.Text;
5+
using System.Text.RegularExpressions;
56
using NUnit.Framework;
67
using Unity.Netcode.TestHelpers.Runtime;
78
using UnityEngine;
@@ -445,7 +446,7 @@ public IEnumerator ChangeOwnershipWithoutObservers()
445446
authorityInstance.ChangeOwnership(otherClient.LocalClientId);
446447
var senderId = authority.LocalClientId;
447448
var receiverId = otherClient.LocalClientId;
448-
LogAssert.Expect(LogType.Warning, $"[Netcode-Session-Owner Sender={senderId}] [Invalid Owner] Cannot send Ownership change as client-{receiverId} cannot see {authorityInstance.name}! Use NetworkShow first.");
449+
LogAssert.Expect(LogType.Warning, new Regex("Cannot send Ownership change as client cannot see NetworkObject"));
449450
Assert.True(authorityInstance.IsOwner, $"[Ownership Check] Client-{senderId} should still own this object!");
450451

451452
// Now re-add the client to the Observers list and try to change ownership

0 commit comments

Comments
 (0)