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

Improve logging and monitoring #151

Merged
merged 7 commits into from
Jan 27, 2025
Merged

Improve logging and monitoring #151

merged 7 commits into from
Jan 27, 2025

Conversation

luator
Copy link
Member

@luator luator commented Jan 27, 2025

  • Change logging format to include timestamp
  • Use different logger names for different modules
  • Store username in IPlayer, so it is more easily available for logging
  • Periodically write information about connected players, games and matchmaking to a file for monitoring

- Add timestamp in log messages
- Use separate loggers with specific names in different components
- Move information like player IDs to the end in a easy parsable format
  (in case we ever want to do some parsing of the logs)
It's not really needed, but adding it there makes it more easily
accessible for logging.
The information included in the file are
- currently connected players
- currently running games
- the matchmaking queue
- matchmaking scores

With this, it is possible to quickly check what is currently going on
without the need to add some extra interface to the server (which would
likely the nicer but more complicated approach).  I recommend using a
file in `/dev/shm` for this to avoid unnecessary IO operations.
@luator luator added the enhancement New feature or request label Jan 27, 2025
@luator luator self-assigned this Jan 27, 2025
@luator luator merged commit 7cee493 into main Jan 27, 2025
6 checks passed
@luator luator deleted the fkloss/logging branch January 27, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant