Elogviewer: A handy GUI for viewing Portage elog messages in Gentoo Linux
April 15, 2016 Leave a comment
When merging (installing) packages in Gentoo, ebuilds often output console messages with information or warnings from the writer of the ebuild, usually at the end of the installation process. However, these ‘elog’ messages will not be displayed if you have configured the environment variable
EMERGE_DEFAULT_OPTS so as to merge packages quietly or in parallel. Even if you did not configure
EMERGE_DEFAULT_OPTS that way, it is easy to miss these messages as they scroll up and off screen if several packages are merging, one after the other.
The Gentoo package manager Portage has a logging facility that, if enabled, will log these elog messages to files so that you can review them afterwards. You can enable this facility by editing the file
/etc/portage/make.conf and adding the environment variable
PORTAGE_ELOG_SYSTEM="save" and the environment variable PORTAGE_ELOG_CLASSES with one or more logging classes. Here are the relevant lines from the file
/etc/portage/make.conf on my laptop:
PORT_LOGDIR="/var/log/portage" PORTAGE_ELOG_SYSTEM="save" PORTAGE_ELOG_CLASSES="info warn error log qa"
For example, after merging the package
www-misc/bluegriffon-bin-1.8 at 06:01:00 on 14 April 2016, I am able to examine the contents of the log file for that specific job:
Of particular interest is the elog message:
If you use BlueGriffon in KDE, use System Settings > Common Appearance and Behaviour > Application Appearance > GTK
and select any GTK theme other than Oyxgen, otherwise BlueGriffon will crash when you click on any pull-down menu.
Clearly, some of the elog messages are important and must not be missed. After reading such messages, users can take appropriate action.
To facilitate reading Portage elog files, there is a GUI utility called Elogviewer which is easy to install and use:
I happen to have configured
EMERGE_DEFAULT_OPTS="--jobs=8 --load-average=8" (i.e. perform installation jobs in parallel using all eight cores of the CPU) in my
/etc/portage/make.conf file, so I don’t see elog messages on screen, and therefore Elogviewer comes in handy. The output in the Konsole window looks like the following when I merge a package:
Notice that the important elog message regarding switching the GTK theme in KDE that is included in the log file was not displayed on the console during installation of the package, because of my setting for
If I then launch Elogviewer, either from the command line or using the KDE launcher, a window pops up as shown below. I can then view a list of recently merged packages and click on each to read the elog output easily. Whether installing only one package or many packages in one session, this makes life easier.