Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Screen logging
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
d4mo
Guru
Guru


Joined: 27 Jun 2005
Posts: 430

PostPosted: Tue Sep 12, 2006 3:40 am    Post subject: Screen logging Reply with quote

I'm going to be doing a big update and I want to do emerge through screen(because I'm doing it over SSH). Is there any way that I can have it log whats going on because if it errors out I want to know what did and why.
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Tue Sep 12, 2006 4:10 am    Post subject: Reply with quote

Code:
emerge foo 2>&1 | tee logfile.txt

See also the various LOG variables in /etc/make.conf.example (I prefer a manual tee, myself)
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
d4mo
Guru
Guru


Joined: 27 Jun 2005
Posts: 430

PostPosted: Tue Sep 12, 2006 4:33 am    Post subject: Reply with quote

That will get me a huge log file though won't it? Is there any way I can get it to do just the errors or better yet the last, say 10 lines before it exits.

EDIT: Also out of curiousity why to you need the 2>&1? wouldn't it work the same without it?
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Tue Sep 12, 2006 4:22 pm    Post subject: Reply with quote

With gnu screen you can use CTRL+a+H to log everything whats going on in the screen window to ~/screenlog.<window_number> ... besides that I really recommend to dive into the LOG variables in /etc/make.conf.example and/or use something like enotice which helps you keeping track of all the messages an emerge process is producing.

HTH
swimmer
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Tue Sep 12, 2006 6:11 pm    Post subject: Reply with quote

d4mo wrote:
EDIT: Also out of curiousity why to you need the 2>&1? wouldn't it work the same without it?
The 2>&1 logs stderr to the same place stdout goes. You would need this if you want to see things printed out the stderr.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum