summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/elog/__init__.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/pym/portage/elog/__init__.py b/pym/portage/elog/__init__.py
index c68fedca0..d3e333534 100644
--- a/pym/portage/elog/__init__.py
+++ b/pym/portage/elog/__init__.py
@@ -46,6 +46,27 @@ _elog_mod_imports = {}
_elog_atexit_handlers = []
_preserve_logentries = {}
def elog_process(cpv, mysettings, phasefilter=None):
+
+ global _elog_mod_imports
+ logsystems = mysettings.get("PORTAGE_ELOG_SYSTEM","").split()
+ for s in logsystems:
+ # allow per module overrides of PORTAGE_ELOG_CLASSES
+ if ":" in s:
+ s, levels = s.split(":", 1)
+ levels = levels.split(",")
+ # - is nicer than _ for module names, so allow people to use it.
+ s = s.replace("-", "_")
+ try:
+ name = "portage.elog.mod_" + s
+ m = _elog_mod_imports.get(name)
+ if m is None:
+ m = __import__(name)
+ for comp in name.split(".")[1:]:
+ m = getattr(m, comp)
+ _elog_mod_imports[name] = m
+ except ImportError:
+ pass
+
ebuild_logentries = collect_ebuild_messages(os.path.join(mysettings["T"], "logging"))
all_logentries = collect_messages()
if all_logentries.has_key(cpv):