Digital Paint Discussion Board

Paintball 2: The Game => Server Discussion => Topic started by: sk89q on November 04, 2007, 01:38:34 AM

Title: Redirecting/piping server stdout/stderr = blank
Post by: sk89q on November 04, 2007, 01:38:34 AM
Whenever I attempt to redirect (to a file) or pipe (to tee), Paintball's stdout and stderr are empty. If I don't redirect or pipe, it gets printed onto stdout with no issue. I am on FreeBSD.

Anyone have a clue?
Title: Re: Redirecting/piping server stdout/stderr = blank
Post by: KnacK on November 04, 2007, 08:01:42 AM
what command are you usingto do this?
/me is really curious about what you are working on......
Title: Re: Redirecting/piping server stdout/stderr = blank
Post by: sk89q on November 04, 2007, 01:32:08 PM
Nothing special. My web RCON client tails a log file so I can read what happens in the game. I used to do this on my older RCON client when I was running on a different server, but ever since I moved to this server, I have been having this trouble.

Commands:
./paintball2 +set dedicated 1 +set public 1 +exec kaf_server_2.cfg +map midnight2 > test.log
./paintball2 +set dedicated 1 +set public 1 +exec kaf_server_2.cfg +map midnight2 >> test.log
./paintball2 +set dedicated 1 +set public 1 +exec kaf_server_2.cfg +map midnight2 2>&1 > test.log
./paintball2 +set dedicated 1 +set public 1 +exec kaf_server_2.cfg +map midnight2 &> test.log
./paintball2 +set dedicated 1 +set public 1 +exec kaf_server_2.cfg +map midnight2 | tee -a test.log

The regular stuff is outputted to the screen if I redirect stderr to a file:
./paintball2 +set dedicated 1 +set public 1 +exec kaf_server_2.cfg +map midnight2 2> test.log
Nothing is outputted to the screen if I redirect stdout to a file:
./paintball2 +set dedicated 1 +set public 1 +exec kaf_server_2.cfg +map midnight2 1> test.log

In addition, I whipped up a PHP script that opens the Paintball process and latches onto stdout. Still no output.
Title: Re: Redirecting/piping server stdout/stderr = blank
Post by: jitspoe on November 06, 2007, 03:39:34 PM
Isn't that normal behavior?  If you're redirecting the output to a file, it isn't going to appear on the screen.  I'm not sure why this is necessary, though.  If you just set logfile 3 (should be that by default), it will log the console to qconsole<port#>.log.
Title: Re: Redirecting/piping server stdout/stderr = blank
Post by: sk89q on November 06, 2007, 04:57:52 PM
Oh no, the file is blank too. 0 bytes.

I've managed to work around the problem by creating hard links to the qconsole files to where I need it, but that doesn't fix the problem. :|