View previous topic :: View next topic |
Author |
Message |
d4mo Guru
Joined: 27 Jun 2005 Posts: 430
|
Posted: Tue Sep 12, 2006 3:40 am Post subject: Screen logging |
|
|
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 |
|
|
Dlareh Advocate
Joined: 06 Aug 2005 Posts: 2102
|
Posted: Tue Sep 12, 2006 4:10 am Post subject: |
|
|
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 |
|
|
d4mo Guru
Joined: 27 Jun 2005 Posts: 430
|
Posted: Tue Sep 12, 2006 4:33 am Post subject: |
|
|
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 |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Tue Sep 12, 2006 4:22 pm Post subject: |
|
|
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 |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Tue Sep 12, 2006 6:11 pm Post subject: |
|
|
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 |
|
|
|