Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use more log level than just trace #566

Open
sebas77 opened this issue Oct 31, 2024 · 6 comments
Open

use more log level than just trace #566

sebas77 opened this issue Oct 31, 2024 · 6 comments

Comments

@sebas77
Copy link

sebas77 commented Oct 31, 2024

I activated the DEBUG_MESSAGES, but apparently everything (or almost everything) is at trace level.
using more level would be nice, I was after only errors/breaking stuff

@RevenantX
Copy link
Owner

@sebas77 errors printed always into logger. Also breaking socket errors you will receive in OnNetworkError method

@sebas77
Copy link
Author

sebas77 commented Nov 1, 2024

thanks @RevenantX . If my current investigation will be successful, I will be clearer with my use case:
We have rare cases where our users time out against our servers hosted by hathora (which use google cloud ultimately). We do get the OnNetworkError (mixed between ConnectionFailed and RemoteConnectionClosed). However we do not have enough info to understand why. I am hoping that verbose log will help us understanding why it happens, but I had to comment out a ton of every frame debug logs and leave only the logs that happens "exceptionally"

@RevenantX
Copy link
Owner

RevenantX commented Nov 1, 2024

@sebas77 you can add Force to specfic log messages that you want to trace without DEBUG_MESSAGES.

@RevenantX
Copy link
Owner

@sebas77 also such timeouts possibly can be because network jumps (wifi->lte). You need enable AllowPeerAddressChange

@sebas77
Copy link
Author

sebas77 commented Nov 1, 2024

@sebas77 also such timeouts possibly can be because network jumps (wifi->lte). You need enable AllowPeerAddressChange

yes that's already done. Our current settings are:

Client:

_netClient = new NetManager(this)
            {
                UnconnectedMessagesEnabled = false, // true makes sense only for broadcasting
                UpdateTime = 15, //value less than 15 are not guaranteed
                AutoRecycle = true, //if false I need to call reader.Recycle(), otherwise I don't
                UnsyncedDeliveryEvent = true, //multithreaded processing, false if you want it on the main thread
                UnsyncedReceiveEvent = true, //multithreaded processing, false if you want it on the main thread
                MtuOverride = FeatureSettings.MaxMtuSize
            };

(note we are also using an UDPAuthKey)

Server:

 _netServer = new NetManager(this)
            {
                UnconnectedMessagesEnabled = false, // true makes sense only for broadcasting, P2P, not our case
                UnsyncedEvents = false, //it's not multithreaded
                AutoRecycle = true, //do not need reader.Recycle(); calls for received NetDataReader
                AllowPeerAddressChange = true,
                MtuOverride = FeatureSettings.MaxMtuSize
            };

the client is on android mobile!

I forgot to say: these timeouts happen ONLY at the connection time, it's like the server never replies back to the client, but the server acknowledged the new connection.

@sebas77
Copy link
Author

sebas77 commented Nov 1, 2024

this is an example of what happens with our logs:

2024-10-31T18:20:31.057Z Frankfurt[3467fe8b] [15]***Info Sim***: [32] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 0): Waiting for 1 players to load...
2024-10-31T18:20:31.134Z Frankfurt[3467fe8b] [15]***Info Sim***: [32] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): 127.0.0.1:40965: received new connection...
2024-10-31T18:20:31.271Z Frankfurt[3467fe8b] [19]***Info Sim***: [245] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): 127.0.0.1:40965: subscribing client connection for player '4836'
2024-10-31T18:20:31.271Z Frankfurt[3467fe8b] [19]***Info Sim***: [245] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): 127.0.0.1:40965: Subscribing connection for player '4836'
2024-10-31T18:20:31.304Z Frankfurt[3467fe8b] [20]***Info Sim***: [279] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): Subscribing player '4836' to VO version 31-1...
2024-10-31T18:20:31.305Z Frankfurt[3467fe8b] [20]***Info Sim***: [279] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): -------------- Creating INITIAL VO... --------------
2024-10-31T18:20:31.306Z Frankfurt[3467fe8b] [20]***Info Sim***: [279] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): Sending player '4836' a FULL VO with size = '5782' bytes.
2024-10-31T18:20:31.306Z Frankfurt[3467fe8b] [20]***Info Sim***: [279] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): Promoting player '4836' to player VOs...
2024-10-31T18:20:31.338Z Frankfurt[3467fe8b] [21]***Info Sim***: [312] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): Send warmup ui event: ui_match_warmup:762736190
2024-10-31T18:20:31.343Z Frankfurt[3467fe8b] [21]***Info Sim***: [312] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): -------------- Creating PLAYER FULL VO... --------------
2024-10-31T18:20:31.568Z Frankfurt[3467fe8b] [28]***Info Sim***: [542] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): '4836-unit_shotgunner-15221' hero is ready, ready count = 1/1.
2024-10-31T18:20:31.601Z Frankfurt[3467fe8b] [29]***Info Sim***: [575] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): 1 players loaded, advancing to next stage.
2024-10-31T18:20:32.631Z Frankfurt[3467fe8b] [60]***Info Sim***: [1606] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): Starting game mode 'Extraction'...
2024-10-31T18:20:32.632Z Frankfurt[3467fe8b] [60]***Info Sim***: [1606] '6ce8c5c66b9b4aa7afa769b0e787' (H: 1, M: 2): Spawning match entity 'unit_play_area_circle' at 256, 256.
2024-10-31T18:21:20.259Z Frankfurt[3467fe8b] [1502]***Info Sim***: [49232] '6ce8c5c66b9b4aa7afa769b0e787' (H: 0, M: 2): Sending match end job for owner id 4836 hero id 15221 - status: WonViaPortal, rank: 1, score: 0
2024-10-31T18:21:20.621Z Frankfurt[3467fe8b] [1513]***Warn Sim***: [49595] '6ce8c5c66b9b4aa7afa769b0e787' (H: 0, M: 2): 127.0.0.1:40965: connection disconnected without unsubscribing player '4836' reason 'RemoteConnectionClose'```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants