I have an executable used for running Valve dedicated game servers. When it runs, it logs its status to the terminal. I want to capture this output in a file while also seeing it.

./srcds_linux -game tf +map cp_dustbowl -maxplayers 24 | tee -a mylogfile.txt

The executable runs just fine, and my terminal is populated with the server logs in real time, but when I kill the server, mylogfile.txt is empty. Is it possible that I can see the logs from the executable but that it’s not actually logging to STDOUT? I’m relatively new to bash/linux scripting.