Package portage :: Package elog :: Module filtering
[hide private]

Source Code for Module portage.elog.filtering

 1  # elog/messages.py - elog core functions 
 2  # Copyright 2006-2010 Gentoo Foundation 
 3  # Distributed under the terms of the GNU General Public License v2 
 4   
5 -def filter_loglevels(logentries, loglevels):
6 # remove unwanted entries from all logentries 7 rValue = {} 8 loglevels = [x.upper() for x in loglevels] 9 for phase in logentries: 10 for msgtype, msgcontent in logentries[phase]: 11 if msgtype.upper() in loglevels or "*" in loglevels: 12 if phase not in rValue: 13 rValue[phase] = [] 14 rValue[phase].append((msgtype, msgcontent)) 15 return rValue
16