# PORTAGE_ELOG_SYSTEM: selects the module(s) to process the log messages. Modules
# included in portage are (empty means logging is disabled):
+# echo (display messages again when emerge exits)
# save (saves one log per package in $PORT_LOGDIR/elog,
# /var/log/portage/elog if $PORT_LOGDIR is unset)
# custom (passes all messages to $PORTAGE_ELOG_COMMAND)
# Some defaults for elog
PORTAGE_ELOG_CLASSES="log warn error"
+PORTAGE_ELOG_SYSTEM="save_summary echo"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for \${PACKAGE} on \${HOST}"
+# elog/__init__.py - elog core functions
+# Copyright 2006-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
from portage.const import EBUILD_PHASES
from portage.exception import PortageException
from portage.process import atexit_register
+# elog/mod_custom.py - elog dispatch module
+# Copyright 2006-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
import portage.elog_modules.mod_save, portage.process, portage.exception
def process(mysettings, cpv, logentries, fulltext):
--- /dev/null
+# elog/mod_echo.py - elog dispatch module
+# Copyright 2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+from portage.output import EOutput
+from portage.const import EBUILD_PHASES
+
+_items = {}
+def process(mysettings, cpv, logentries, fulltext):
+ _items[cpv] = logentries
+
+def finalize(mysettings):
+ printer = EOutput()
+ for cpv in _items.keys():
+ print
+ printer.einfo("Messages for package %s:" % cpv)
+ print
+ for phase in EBUILD_PHASES:
+ if not phase in _items[cpv]:
+ continue
+ for msgtype, msgcontent in _items[cpv][phase]:
+ fmap = {"INFO": printer.einfo,
+ "WARN": printer.ewarn,
+ "ERROR": printer.eerror,
+ "LOG": printer.einfo,
+ "QA": printer.ewarn}
+ for line in msgcontent:
+ fmap[msgtype](line.strip("\n"))
+ return
-# portage.py -- core Portage functionality
-# Copyright 1998-2004 Gentoo Foundation
+# elog/mod_mail.py - elog dispatch module
+# Copyright 2006-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-# portage.py -- core Portage functionality
-# Copyright 1998-2004 Gentoo Foundation
+# elog/mod_mail_summary.py - elog dispatch module
+# Copyright 2006-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id: mod_mail.py 3484 2006-06-10 22:38:44Z genone $
+# $Id$
import portage.mail, socket, os, time
from email.MIMEText import MIMEText as TextMessage
+# elog/mod_save.py - elog dispatch module
+# Copyright 2006-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
import os, time
from portage.data import portage_uid, portage_gid
+# elog/mod_save_summary.py - elog dispatch module
+# Copyright 2006-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
import os, time
from portage.data import portage_uid, portage_gid
+# elog/mod_syslog.py - elog dispatch module
+# Copyright 2006-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
import syslog
from portage.const import EBUILD_PHASES