Create an append log for a detached screen session

gnu-screenlogging

I use a detached screen session to launch a process, I like it 'cause I can reattach the session and check how it is going.

The process shows output on a session, checked with screen -r or screen -x, I would like to create a log too, for this informations, both for the screen session and to a log file.

usually I use this screen command:

screen -A -m -d -S prog01 binarie_program

and I have tried this:

screen -A -m -d -S prog01 binario > server.log

with no success, in fact it creates the file called server.log but empty of rows.

Any suggestions?

Thanks in advance

Best Answer

From the man page:

 -L   tells screen to turn on automatic output logging for the windows.