Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Log of emerge readable output produced somewhere?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
nmbrthry
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2005
Posts: 80
Location: Urbana-Champaign, IL

PostPosted: Fri Jun 02, 2006 5:03 pm    Post subject: Reply with quote

synss and I have a PyGTK program for more easily reading the elog files produced by Portage. See this topic for more information.
Back to top
View user's profile Send private message
XenoTerraCide
Veteran
Veteran


Joined: 18 Jan 2004
Posts: 1418
Location: MI, USA

PostPosted: Fri Jun 02, 2006 7:05 pm    Post subject: Reply with quote

is elog going to get a manpage? or become part of another one? I want to know exactly what the different levels are logging.
_________________
I don't hang out here anymore, try asking on http://unix.stackexchange.com/ if you want my help.
Back to top
View user's profile Send private message
XenoTerraCide
Veteran
Veteran


Joined: 18 Jan 2004
Posts: 1418
Location: MI, USA

PostPosted: Fri Jun 02, 2006 7:13 pm    Post subject: Reply with quote

how do you get it to log only the *green and *orange messages? I seem to be getting a lot of... things in the logs I don't want. like
Code:
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... i686-pc-linux-gnu-g++ -E
checking for i686-pc-linux-gnu-g77... i686-pc-linux-gnu-g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether i686-pc-linux-gnu-g77 accepts -g... yes
checking the maximum length of command line arguments..


frankly I don't care about any of that unless it breaks.
_________________
I don't hang out here anymore, try asking on http://unix.stackexchange.com/ if you want my help.
Back to top
View user's profile Send private message
XenoTerraCide
Veteran
Veteran


Joined: 18 Jan 2004
Posts: 1418
Location: MI, USA

PostPosted: Fri Jun 02, 2006 7:17 pm    Post subject: Reply with quote

can you limit or rotate the logs for elog? the only kind of documentation I find for it is make.conf.example and that's far from being very helpful.
_________________
I don't hang out here anymore, try asking on http://unix.stackexchange.com/ if you want my help.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1300
Location: Mississippi USA

PostPosted: Sun Jun 25, 2006 6:41 am    Post subject: Reply with quote

XenoTerraCide wrote:
can you limit or rotate the logs for elog? the only kind of documentation I find for it is make.conf.example and that's far from being very helpful.


I'm trying to figure mine out too. I use logrotate to keep down the size and age of my files. It works pretty well, does what it should for sure. Just wish it would rotate my dirty dishes to the dishwasher. :roll:

:D :D :D :D :D
_________________
My rig: Gigabyte GA-770T-USB3 mobo AMD Phenom II X4 955 3.2GHz ZALMAN CNPS10X Performa CPU cooler
G.SKILL 16GB DDR3 PC3 12800 Memory Nvidia GT-220 video card LG W2253 Monitor
WD1600AAJS & WD2502ABYS hard drives
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
Aule
n00b
n00b


Joined: 19 Sep 2005
Posts: 21

PostPosted: Thu Jun 29, 2006 1:33 pm    Post subject: Reply with quote

dalek wrote:
XenoTerraCide wrote:
can you limit or rotate the logs for elog? the only kind of documentation I find for it is make.conf.example and that's far from being very helpful.


I'm trying to figure mine out too. I use logrotate to keep down the size and age of my files. It works pretty well, does what it should for sure. Just wish it would rotate my dirty dishes to the dishwasher.


Could you please post your /etc/logrotate.d/[whatever]?

Aule
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1300
Location: Mississippi USA

PostPosted: Thu Jun 29, 2006 3:29 pm    Post subject: Reply with quote

Aule wrote:
Could you please post your /etc/logrotate.d/[whatever]?

Aule


/etc/logrotate.d/emerge.log

Code:
/var/log/emerge.log {
   size 1000k
   monthly
   rotate 5
   missingok
   copytruncate
   compress
}


Now if I could just get it to leave the last couple weeks worth instead of blanking it out. :? It should compress it when it gets to 1MB or once a month, whichever comes first. It should also delete the old ones that are more than 5 months old. That's my theory anyway. :wink:

Hope that helps.

:D :D :D :D :D
_________________
My rig: Gigabyte GA-770T-USB3 mobo AMD Phenom II X4 955 3.2GHz ZALMAN CNPS10X Performa CPU cooler
G.SKILL 16GB DDR3 PC3 12800 Memory Nvidia GT-220 video card LG W2253 Monitor
WD1600AAJS & WD2502ABYS hard drives
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
AndrewWilcox
n00b
n00b


Joined: 28 Jun 2005
Posts: 6

PostPosted: Sun Jul 16, 2006 2:31 pm    Post subject: How do I get PORTAGE_ELOG_CLASSES to actually do anything? Reply with quote

I'm running Portage 2.1-r1, and following the instructions in /etc/make.conf.example I tried to set up emerge logging:

/etc/make.conf:
Quote:
PORTAGE_ELOG_SYSTEM="save"
PORT_LOGDIR=/var/log/portage
PORTAGE_ELOG_CLASSES="error"


The settings appear to be being used:

Quote:
# emerge --info --verbose | grep LOG
HUSHLOGIN="FALSE"
LOGNAME="root"
PORTAGE_ELOG_CLASSES="error"
PORTAGE_ELOG_MAILFROM="portage"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save"
PORT_LOGDIR="/var/log/portage"


However, in the log file produced I get all the output from the emerge, regardless of what I set PORTAGE_ELOG_CLASSES to.

I desperately need to see the important informational messages that an emerge produces, without the clutter of all the downloading, configuring, and compiling output.

Can you help?

Thank you,

Andrew
Back to top
View user's profile Send private message
thoughtform
Guru
Guru


Joined: 24 May 2004
Posts: 586
Location: east coast USA

PostPosted: Mon Aug 14, 2006 3:51 am    Post subject: Reply with quote

Andrew did you get an answer? I'm looking for this solution, too.
Thanks.
Back to top
View user's profile Send private message
AndrewWilcox
n00b
n00b


Joined: 28 Jun 2005
Posts: 6

PostPosted: Mon Aug 14, 2006 10:38 am    Post subject: Reply with quote

Scorpaen wrote:
Andrew did you get an answer? I'm looking for this solution, too.
Thanks.


Not here, but in a Linux.com article (http://www.linux.com/article.pl?sid=06/08/07/1952207) I saw a link to a thread in these forums on graphical front ends to emerge logs (http://forums.gentoo.org/viewtopic-t-465493.html) Haven't had a chance to look at them yet.

Andrew
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9013
Location: beyond the rim

PostPosted: Mon Aug 14, 2006 12:46 pm    Post subject: Reply with quote

If you don't want the full logs then don't set PORT_LOGDIR.
Anyway, the elog logfiles are in $PORT_LOGDIR/elog (/var/log/portage/elog if $PORT_LOGDIR is unset or empty)
Back to top
View user's profile Send private message
stevit
n00b
n00b


Joined: 19 Nov 2004
Posts: 31

PostPosted: Thu Aug 17, 2006 3:23 am    Post subject: Reply with quote

I wrote a smal script for the elog custom command.
In my opinion those path applying infos are quite uninteresting, etc
but there is no way to deaktivate them and still get those infos what
you most likely shoukd do after merging your pakets.
So.... it's nothing big, some colours, filtering, piping, etc.
but the escaping of special chars took some time...
so perhaps someone finds it useful and don't have to build something like that on his own.


smals and simple emerge log summery on your ttys:
Code:

PORTAGE_ELOG_CLASSES="warn error info"      # http://www.gentoo.de/main/de/portage-2.1.xml
PORTAGE_ELOG_SYSTEM="save custom"           # save, syslog, mail, custom

PORTAGE_ELOG_COMMAND=             # some log-message formating... > /dev/tty11
   # if logfile exists....
   " if [ -f '\${LOGFILE}' ] ; then 
      echo -e '\\n\\033[32m'`date '+%d %b - %T:'` '\\033[1;31m''\${PACKAGE}': '\\033[m' > /dev/tty11;
      cat \${LOGFILE}  | egrep -v '(Running)|(Applying)|(INFO:)|(WARN:)|(^[:space:]*\$)' > /dev/tty11;
      exit 0;    
     fi" # exit with no errors... grep would "exit 1" on no matches   

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
- Rick Cook
Back to top
View user's profile Send private message
jorgepeixoto
Apprentice
Apprentice


Joined: 27 Apr 2006
Posts: 218
Location: São José dos Campos, São Paulo, Brasil

PostPosted: Thu Aug 17, 2006 9:35 pm    Post subject: Is it ok to delete files in /var/log/portage? Reply with quote

My /var/log/portage is currently 253 MB. Is it ok/safe for me to delete some files in it (there are a couple of files that are really large) ?
Back to top
View user's profile Send private message
stevit
n00b
n00b


Joined: 19 Nov 2004
Posts: 31

PostPosted: Thu Aug 17, 2006 10:22 pm    Post subject: Reply with quote

I delete the content of my /var/log/portage regulary.
So far nothing bad happend.

Perhaps try to avoid removing directories for e.g. /var/log/portage/elog or /var/log/portage itself.
All files within should be quite compensable (as long as there is no current emerge running).
_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
- Rick Cook
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4836
Location: Gothenburg, Sweden

PostPosted: Fri Aug 18, 2006 8:36 am    Post subject: Reply with quote

The full build logs are typically useful only when you want to debug a build afterwards, for instance if a build error is no longer in your scroll buffer.
_________________
Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.freenode.net
Back to top
View user's profile Send private message
juniper
l33t
l33t


Joined: 22 Oct 2004
Posts: 758
Location: EU

PostPosted: Sun Aug 20, 2006 3:35 pm    Post subject: Reply with quote

i made a post and it was locked saying that it was answered in this thread. well, i can't see the answer anywhere, so i will ask it again.

sometime when a package is emerged there is a little warning at the end, saying something like "run env-update". i think this information is stored in the ebuild as an "einfo".

is there a way to view this info with a command? like

<command> ebuild

and it pops out all the einfos?
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4836
Location: Gothenburg, Sweden

PostPosted: Sun Aug 20, 2006 4:05 pm    Post subject: Reply with quote

The suggestion to run etc-update is displayed after every emerge if there are files under config protection to update. It has nothing to do with einfo. The e{info,warn,error,log} messages you see while emerging is often USE flag dependant and watching them all for an ebuild is not always relevant. Anyway,
Code:
grep -E 'einfo|ewarn,eerror,elog' /path/to/ebuild

will show them all, albeit losing most context. Setup the elog framwork to your liking to see it after an emerge.
_________________
Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.freenode.net
Back to top
View user's profile Send private message
juniper
l33t
l33t


Joined: 22 Oct 2004
Posts: 758
Location: EU

PostPosted: Sun Aug 20, 2006 5:03 pm    Post subject: Reply with quote

i don't really want to see it after an emerge, i want to see it whenever i feel like it.

i thought that was maybe a command. i guess i will use grep.
Back to top
View user's profile Send private message
rwf
Apprentice
Apprentice


Joined: 24 Jan 2004
Posts: 234
Location: mi.us

PostPosted: Fri Sep 15, 2006 11:35 pm    Post subject: Reply with quote

File names changed in /var/log/portage (PORT_LOGDIR)?

A snippet from my /var/log/portage directory (emacs dired)

Code:

  -rw-r--r-- 1 root    portage   882 Sep 12 18:33 7137-portage-2.1.1.log
  -rw-r--r-- 1 root    portage     0 Sep 12 18:33 7138-portage-2.1-r2.log
  -rw-r--r-- 1 root    portage   534 Sep 12 18:33 7138-portage-2.1.1.log
  -rw-r--r-- 1 root    portage  123K Sep 14 10:46 app-admin:gnome-system-tools-2.14.0:20060914-173330.log
  -rw-r--r-- 1 root    portage   464 Sep 14 10:45 app-admin:gnome-system-tools-2.14.0:20060914-174527.log
  -rw-r--r-- 1 root    portage   14K Sep 14 10:47 app-admin:gnomesu-0.3.1:20060914-174633.log


The previous file format was date sequential. That way I could check the log's after a emerge --sync and emerge -avuDN world to see if any nice advisories were issused i.e.

Code:

 * You must re-compile all packages that are linked against
 * OpenSSL 0.9.7 by using revdep-rebuild from gentoolkit:
 * # revdep-rebuild --library libssl.so.0.9.7
 * # revdep-rebuild --library libcrypto.so.0.9.7
 * After this, you can delete /usr/lib/libssl.so.0.9.7
 * and /usr/lib/libcrypto.so.0.9.7


The 'new' format does not lend itself to scanning by date. Did I miss something?
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9013
Location: beyond the rim

PostPosted: Sat Sep 16, 2006 3:48 am    Post subject: Reply with quote

You can still sort the files by date, just use the mtime as sort key (with ls -t for example).
Back to top
View user's profile Send private message
rwf
Apprentice
Apprentice


Joined: 24 Jan 2004
Posts: 234
Location: mi.us

PostPosted: Sat Sep 16, 2006 6:22 am    Post subject: Reply with quote

Genone wrote:
You can still sort the files by date, just use the mtime as sort key (with ls -t for example).


I knew that -- was just wondering why things changed. Somebody might want to update the /etc/make.config.example file which was included with the 2.1.1 portage update -- which caused the change/problem.
Code:

# PORT_LOGDIR is the location where portage will store all the logs it
#     creates from each individual merge. They are stored as NNNN-$PF.log
#     in the directory specified. This is disabled until you enable it by
#     providing a directory. Permissions will be modified as needed IF the
#     directory exists, otherwise logging will be disabled. NNNN is the
#     increment at the time the log is created. Logs are thus sequential.
#PORT_LOGDIR=/var/log/portage
Back to top
View user's profile Send private message
ruivilela
Apprentice
Apprentice


Joined: 05 Oct 2004
Posts: 236
Location: Łódź

PostPosted: Mon Oct 16, 2006 9:02 am    Post subject: Post-install messages ? [Solved] Reply with quote

Is it currently possible to see emerge messages after an emerge world. I don't find much info on how to do this, but i know that this is/was planned.

Last edited by ruivilela on Mon Oct 16, 2006 9:21 am; edited 1 time in total
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Mon Oct 16, 2006 9:08 am    Post subject: Reply with quote

Add "PORT_LOGDIR=/var/log/portage" to /etc/make.conf and all emerge output will be saved in the directory specified. You will need to clear it out manually on occasion.

Edit: That will save *all* output, including the compile. Read the portage man page and /etc/make.conf.example for information on how to only save the info and warning messages.
Back to top
View user's profile Send private message
ruivilela
Apprentice
Apprentice


Joined: 05 Oct 2004
Posts: 236
Location: Łódź

PostPosted: Mon Oct 16, 2006 9:20 am    Post subject: Reply with quote

Thanks for tip. This will save me lot of time with post-install problems.
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Mon Oct 16, 2006 9:23 am    Post subject: Reply with quote

If you decide to save all output, you might search the forums for a tool called, portlog-info. It is just a shell script that scans through all the files in PORT_LOGDIR and displays the einfo and ewarn messages.

See http://forums.gentoo.org/viewtopic-t-131795-highlight-portloginfo.html for more information on this topic.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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