comparison engine/extensions/fifelog.py @ 119:6f9c7d0b35d4

logger now ignores non-existing log modules (warns to prompt)
author jasoka@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 31 Jul 2008 17:53:21 +0000
parents 4a0efb7baf70
children 9a1529f9625e
comparison
equal deleted inserted replaced
118:0c6fe081ca86 119:6f9c7d0b35d4
35 if 'all' in names: 35 if 'all' in names:
36 for k in self.mod2name.keys(): 36 for k in self.mod2name.keys():
37 self.lm.addVisibleModule(k) 37 self.lm.addVisibleModule(k)
38 else: 38 else:
39 for m in names: 39 for m in names:
40 self.lm.addVisibleModule(self.name2mod[m]) 40 try:
41 41 self.lm.addVisibleModule(self.name2mod[m])
42 except KeyError:
43 print 'Tried to enable non-existing log module "%s"' % m
44
42 def removeVisibleModules(self, *names): 45 def removeVisibleModules(self, *names):
43 ''' 46 '''
44 Removes modules that are visible in logs. By default, all modules 47 Removes modules that are visible in logs. By default, all modules
45 are disabled. 48 are disabled.
46 @param names: module names to set invisible 49 @param names: module names to set invisible