hll_rcon_tool icon indicating copy to clipboard operation
hll_rcon_tool copied to clipboard

Include tagged version in logging/API calls

Open cemathey opened this issue 4 months ago • 0 comments

Including the version in output should make it a lot easier to help people troubleshoot their problems, especially when people are running an older version where a problem is already fixed.

  • Standardizes the logging format between the rcon and rconweb packages
    • rcon logging wasn't including the server name
  • Use the server short name as configured instead of the server name returned by the game server
  • Include the tagged version in log files
  • Include the tagged version in API responses

Example output:

api_1.log:

[2024-04-09 21:41:24,792][WARNING][MyServer1][v9.6.2] rconweb auth.py:is_logged_in:120 | admin's steam id is not set 

startup.log

[2024-04-09 21:51:10,482][INFO][MyServer1][v9.6.2] __main__ seed_db.py:seed_default_config:42 | Seeding DB

get_status:

{
    "result": {
        "name": "The BEER [HAUS] 2 |US EAST-VA| discord.gg/beerhaus",
        "map": "omahabeach_warfare",
        "nb_players": "98/100",
        "short_name": "MyServer1",
        "player_count": "98",
        "server_number": 1
    },
    "command": "get_status",
    "arguments": {},
    "failed": false,
    "error": "",
    "forward_results": null,
    "version": "v9.6.2"
}

cemathey avatar Apr 09 '24 21:04 cemathey