Ejemplo n.º 1
0
def _loadLoggingModule(loggingModule):
    if loggingModule!=None:
        m = _importModuleName(loggingModule)
        return m
Ejemplo n.º 2
0
from random import Random
import copy
import threading
import time
import traceback
import unittest

MultipleItems = 10
MultipleGetters = 10
MultiplePutters = 10

try:
    import logging
    testLoggingModule = logging
except:
    testLoggingModule = _importModuleName("PyRQ.logger.logging")

class _BaseReader(unittest.TestCase):
    HAMMER_TIME = 10
    def _getLogger(self):
        loggingModule = testLoggingModule
        logger = loggingModule.getLogger("TEST")
        loggingLevel = loggingModule.DEBUG
        self.loggingLevel = loggingLevel
        logger.setLevel(loggingLevel)
        try:
            #    Remove existing logger handlers:
            for handler in logger.handlers[:]:
                try:    logger.removeHandler(handler)
                except: pass
        except: