This is a small program written in Go which redirects
the output of the srcds_linux executable to stdout.
It was originally intended for Garrys Mod, but this fork is intended for running TF2 SRCDS via SystemD and Screen.
- Download the latest release from GitHub
- Put the file
source_loggerinto the same directory assrcds_linux - Add
source-loggerbeforesrcds_runorsrcds_linux.
An example start script before:
#!/bin/bash
./srcds_linux -maxplayers 16 +gamemode terrortown +map ttt_waterworldA start script using SourceLogger
#!/bin/bash
./source-logger ./srcds_linux -maxplayers 16 +gamemode terrortown +map ttt_waterworldAll arguments to source_logger will be forwarded to srcds_linux, so you can just keep your old arguments.
This program uses creack/pty to create a pseudo console and capture its output.