ZeusWPI / MOZAIC

MOZAIC is the Massive Online Zeus Artificial Intelligence Competition platform
GNU Lesser General Public License v3.0
13 stars 6 forks source link

gameserver logging #269

Open iasoon opened 6 years ago

iasoon commented 6 years ago

@Robbe7730 tends to get upset because we don't really do much logging in the gameserver (and rightfully so), so maybe we should?

Just to be clear, this is not about logging what happens in a game, but rather about the mechanics of the gameserver (connections are opened, handshakes that fail, ... , in short: things you want to be aware of when trying to debug silly mistakes).

So, how do we want to do this? I can see two main paths: go with a standard logging solution (such as the standard rust logging library or slog), or set up our on system based on MOZAIC events. The latter would obviously be more work, but might also yield some nice advantages (for example, we might be able to unify the "system log" into the regular game log, where appropriate).

Any opinions?

wschella commented 6 years ago

MOZAIC events. I feel like it offers too much benefits in terms of debugability, as the sequence of actions is a lot more clear, and possible cause-effect relations might be easier to deduce. Unification also feels a lot cleaner.

wschella commented 6 years ago

I feel like in the future there will be use cases where the 'system log' and game log will need to be split again (or more like filtered) e.g. for sharing game log, but that's problems for later, and they don't seem too difficult.

iasoon commented 6 years ago

I don't think you usually want to share logs run in debug mode, and even if you do, apart from filesize there is no real issue as far as I can see.

wschella commented 6 years ago

Okay, I was mistaken about the scope of the question. Do all the things you mentioned in the initial examples only get logged in 'debug mode'?

iasoon commented 6 years ago

I did not really think the examples through, it is mostly just about things that are not really relevant to the replay log (so, events that have an effect that is already logged, or no effect at all)