FAForever / server

The servercode for the Forged Alliance Forever lobby
http://www.faforever.com
GNU General Public License v3.0
67 stars 62 forks source link

More info logging #951

Closed Askaholic closed 1 year ago

Askaholic commented 1 year ago

Some changes that will make it easier to search the logs in grafana, and some changes to make it easier to correlate messages with the player that caused them. I also moved some messages into the info level that happen when people connect/disconnect. This means there will be a log message containing the IP address of everyone who connects:

INFO     Jan 07  13:13:13 ServerContext                  LobbyServer[SimpleJsonProtocol]: Client connected from 127.0.0.1:39214
Sheikah45 commented 1 year ago

I don't think we want to be exposing people's IP addresses in logs that are more or less publicly viewable. I think that should probably be removed else we will have to be more secure about the logs in grafana for the server.

@Brutus5000 what are your thoughts?

Askaholic commented 1 year ago

BTW, IP addresses can already show up in the logs if the connection is aborted before the player logs in.

Sheikah45 commented 1 year ago

Then those should likely be removed as well if we don't want IPs in the logs

Brutus5000 commented 1 year ago

As long as the sensitive logs get rotated out eventually I have no issues with logging IPs. We also keep ips for other purposes such as fraud login detection.

Sheikah45 commented 1 year ago

Alright then wasn't sure since these logs are more widely available in grafana besides just server admins

Askaholic commented 1 year ago

So is this good to be merged then?

Brutus5000 commented 1 year ago

I can't say anything from the python side of things, but sure, go ahead.