Bug#864572: openarena-server: consider to use StandardOutput=null in systemd service files

Simon McVittie smcv at debian.org
Mon Jul 24 08:11:02 UTC 2017


On Sat, 10 Jun 2017 at 22:38:27 +0200, Markus Koschany wrote:
> Currently all in-game messages including chat conversations are
> logged in systemd's journal
...
> Of course the workaround is to write these ignore rules or to
> overwrite the default service files with a custom one which is placed
> in /etc/systemd/system.
> 
> Normally the latter is a good advice but I think in this special case
> we could use the StandardOutput=null option and stop logging to
> /var/log/syslog at all. The OpenArena server already logs the same
> information to /var/games/openarena-server/server.oa/baseoa/games.log
> thus the information wouldn't be lost.

Unfortunately, this isn't entirely true. Writing out games.log is part
of the game plugin (qagame*.so), so it only logs certain in-game
messages from src:openarena (chat, kills, item pickups, that sort of
thing). If we redirected the server's stdout and stderr to /dev/null, we
would be missing the messages printed by the ioquake3 engine (startup,
shutdown, warnings, errors) some of which are fairly important, and we'd
also miss anything printed by src:openarena using G_Printf() instead of
G_LogPrintf().

We could maybe give the openarena-server wrapper script a
--logfile=LOGFILE option which would "exec >${logfile} 2>&1" before
running the actual server, and make the systemd units run with
"--logfile=/var/games/openarena-server/%i.oa/server.log" or
"--logfile=/var/log/openarena-server/%i/server.log" or something?
But then we'd need to implement at least simple log rotation (otherwise
whenever the server crashed, the log with crash details would
immediately be overwritten by the log for the restarted server).

Alternatively, maybe we could add a cvar to disable printing lines to
stdout if they are also printed to games.log? (At the moment it's
controlled by the 'dedicated' cvar.) That way each line would be
printed to either the Journal or games.log but never both.

    S



More information about the Pkg-games-devel mailing list