Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have application written in Go language and it runs in screen (I do not think problem relates to Go language. I believe it uses STDOUT and STDERR)

screen -S log_server -d -m go run log_server.go 2 > err3.txt 1 > std3.txt

When it crashes I get error written in screen not in err3.txt or std3.txt

screen does not scroll and does not allow me to read full error.

std3.txt works properly err3.txt has size 0 and error is printed in screen (I can see last 20 or 30 lines) App crashes once per 3 or 5 days.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Not all spaces are permissible. Try instead

screen -S log_server -d -m go run log_server.go 2> err3.txt 1> std3.txt
share|improve this answer
    
Thank You. I ran command as you advised. std3.txt worked for me. So I thought these spaces are Ok. –  Max Apr 21 '13 at 9:16
1  
Nope. But > std3.txt is a lawful form of 1> std3.txt, so redirecting STDOUT was working, and the rest of the stuff was just creating errors or being ignored as extra arguments to the main command. By the way, and forgive me for saying this, but feel free to ACCEPT the answer if you're happy with it. –  MadHatter Apr 21 '13 at 9:53
    
I planned to mark answer accepted once process will crash and I will get error in file. But it is not a problem. Thank You for you response. I am happy with your answer. It is accepted. –  Max Apr 21 '13 at 20:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.