Portage log/ja

パッケージを構築するためのemergeを使用する場合は、portageからのメッセージに気づき珍しいことではありません. 彼らはGentoo開発者からの重要な情報が含まれる場合がありますので、それは、それらを読むことをお勧めですが、彼らは急速に画面の外にスクロールしているため、多くの場合、これはすぐには不可能です. これは、簡単にその目的は、後にレビューのためにディスクにメッセージを保存することですELOGと呼ばれるPortageの機能を、有効にすることで解決することができます. しかし、他のロギング機能も同様に存在します...

Portage elog subsystem
The Portage elog subsystem keeps track of specific, ebuild-provided log messages that developers have put in the ebuilds to attract attention of the administrator or user. Often, these messages contain important or interesting information related to the build of said package.

Setup
Select which kind of information should be logged through the  variable. Possible values are,  ,  ,   and  :

Configuring for file-based storage
Portage can handle the elog events in a number of ways.

In order to save the elog events to disk, enable the  module in the   variable:

The messages will be saved in or in  if said variable is set.

In order to create per-category elog files, enable the  Portage feature. It will force Portage to create category-based subdirectories of the location.

Configuring for e-mail
To mail logs to a recipient, enable the  module. The mail option requires some additional variables to be set. Read for more information.

Below, an example setup is shown which is hopefully self-explanatory:

Related software
The following is a list of elog-related software packages:


 * - Curses based utility to parse the contents of elogs
 * - Python based elog viewer
 * - Module to support XMPP (Jabber) protocol for elog events

Build logs
With the Portage elog subsystem, package build logs are saved on disk or mailed to a remote recipient, regardless of failure or success. This allows for administrators to review builds later or retrieve build logs for support tickets.

Setup
To enable Portage logging, edit and set   to a location where the log files should be stored. By default, Portage will use :

Next, a number of  settings influence how Portage handles build logs.


 * With  set, even binary package deployments will have their logs saved
 * When  is set, regular log file clean operations are executed. The command that is executed is defined by   and defaults to a retention of the files of 7 days.
 * With  set, build logs are stored in category-named subdirectories of

Cleaning up
When  is set, Portage will execute the command defined by   after every build or unmerge operation. By default, the following command is used:

When defining a custom command, do not forget to escape the  variable (or immediately hardcode the right location).

External resources

 * Underestimated or underused: Portage (e)logging on (Sven Vermeulen's blog)