triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.29k stars 382 forks source link

Fix log formatting on bots #6804

Open DanVanAtta opened 4 years ago

DanVanAtta commented 4 years ago

How can the problem be recreated?

ssh to a bot

sudo journalctl -u bot@01 -f

Notice log format:

Jun 24 06:47:41 li1232-106 run_server[2989014]: Jun 24, 2020 6:47:41 AM org.triplea.game.server.AvailableGames lambda$newGameRepository$0
Jun 24 06:47:41 li1232-106 run_server[2989014]: INFO: Loading map: /home/bot/maps/war_of_the_lance-master.zip

We do not need:

Do you have any ideas for an expected fix?

Desired format:

Jun 24 06:47:41 UTC org.triplea.game.server.AvailableGames lambda$newGameRepository$0 [INFO]:  Loading map: /home/bot/maps/war_of_the_lance-master.zip
RoiEXLab commented 4 years ago

@DanVanAtta The Jun 24 06:47:41 li1232-106 run_server[2989014]: prefix is added in by journalctl, not on our side

RoiEXLab commented 4 years ago

Just did some research and according to the manpage of journalctl

if you typed sudo journalctl -u bot@01 -f -o cat it should only print the raw stdout part