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:
$ cat /var/log/portage/elog/www-misc:bluegriffon-bin-1.8:20160414-060100.log
INFO: setup
Package: www-misc/bluegriffon-bin-1.8
Repository: local_overlay
USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
FEATURES: preserve-libs sandbox userpriv usersandbox
LOG: install
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.
QA: other
QA Notice: Pre-stripped files found:
/opt/bluegriffon/libreplace_jemalloc.so
/opt/bluegriffon/libnssdbm3.so
/opt/bluegriffon/libnss3.so
/opt/bluegriffon/bluegriffon-bin
/opt/bluegriffon/libnssutil3.so
/opt/bluegriffon/gmp-clearkey/0.1/libclearkey.so
/opt/bluegriffon/libsmime3.so
/opt/bluegriffon/libplc4.so
/opt/bluegriffon/libnssckbi.so
/opt/bluegriffon/plugin-container
/opt/bluegriffon/libsoftokn3.so
/opt/bluegriffon/libssl3.so
/opt/bluegriffon/libnspr4.so
/opt/bluegriffon/libxul.so
/opt/bluegriffon/libfreebl3.so
/opt/bluegriffon/components/libmozgnome.so
/opt/bluegriffon/components/libdbusservice.so
/opt/bluegriffon/libplds4.so
/opt/bluegriffon/libmozsqlite3.so
/opt/bluegriffon/bluegriffon
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:
# emerge elogviewer
$ elogviewer --help
usage: elogviewer [-h] [-p ELOGPATH] [--log {DEBUG,INFO,WARNING,ERROR}]
Elogviewer should help you not to miss important information. You need to
enable the elog feature by setting at least one of PORTAGE_ELOG_CLASSES="info
warn error log qa" and PORTAGE_ELOG_SYSTEM="save" in /etc/make.conf. You need
to add yourself to the portage group to use elogviewer without privileges.
Read /etc/make.conf.example for more information.
optional arguments:
-h, --help show this help message and exit
-p ELOGPATH, --elogpath ELOGPATH
path to the elog directory
--log {DEBUG,INFO,WARNING,ERROR}
set logging level
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:
# emerge -v bluegriffon-bin
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ~] www-misc/bluegriffon-bin-1.8::local_overlay 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) www-misc/bluegriffon-bin-1.8::local_overlay
>>> Installing (1 of 1) www-misc/bluegriffon-bin-1.8::local_overlay
>>> Jobs: 1 of 1 complete Load avg: 0.11, 0.07, 0.13
>>> Auto-cleaning packages...
>>> No outdated packages were found on your system.
* GNU info directory index is up-to-date.
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 EMERGE_DEFAULT_OPTS
.
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.

Elogviewer window