Log management


I want to record/print log about each match from the server. But during match handler working, there are many matches running in the same time, and i cannot easily recognized the log is related to which match. What i think of is adding label (match_id) into the log to check what match it is about, but it will make log more longer.

Do you have a recommended way to group log?

Thanks in advance.

If you use the authoritative multiplayer feature all log messages printed by the match process (including any nk.logger_* calls in the Lua runtime, and logger.* calls in the Go runtime) will be tagged with a "mid" field in the log line that contains the match ID.

You should group your log output in your aggregator by that field.