Changeset 6577 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 3 Aug 2011, 22:26:10 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/testing.py
r6466 r6577 3 3 import grok 4 4 import doctest 5 import logging 5 6 import os.path 6 7 import re … … 19 20 FunctionalLayer = ZCMLLayer(ftesting_zcml, __name__, 'FunctionalLayer', 20 21 allow_teardown=True) 22 23 def get_all_loggers(): 24 """Get the keys of all logger defined globally. 25 """ 26 return logging.root.manager.loggerDict.keys() 27 28 def remove_new_loggers(old_loggers): 29 """Remove the loggers in `old_loggers`. 30 31 `old_loggers` is a list of logger keys as returned by 32 :func:`get_all_loggers`. All globally registered loggers whose 33 name is not in `old_loggers` is removed. 34 """ 35 new_loggers = [key for key in logging.root.manager.loggerDict 36 if key not in old_loggers] 37 for key in new_loggers: 38 del logging.root.manager.loggerDict[key] 39 return 21 40 22 41 def setUpZope(test=None):
Note: See TracChangeset for help on using the changeset viewer.