python testsuite doesn't show output on console
<p>This is my sample code</p>

<pre><code>class StreamToLogger(object):
    def __init__(self, logger, log_level=logging.INFO):
        self.logger = logger
        self.log_level = log_level
        self.linebuf = ''

    def write(self, buf):
        for line in buf.rstrip().splitlines():
            self.logger.log(self.log_level, line.rstrip())



logging.basicConfig(level=logging.DEBUG,
                    format='%(asctime)s:%(levelname)s:%(name)s:%(message)s',
                    filename="logger.log",
                    filemode='w'
                    )

stdout_logger = logging.getLogger('STDOUT')
sl = StreamToLogger(stdout_logger, logging.INFO)
sys.stdout = sl

stderr_logger = logging.getLogger('STDERR')
sl = StreamToLogger(stderr_logger, logging.ERROR)
sys.stderr = sl

suite = suite()
tests = unittest.TextTestRunner(descriptions=True, verbosity=2).run(suite)
</code></pre>

<p>As <code>TextTestRunner</code> by default uses stream as <code>stderr</code>. I have used the stderr to write the output in the log file and it's working. Can we use <code>stderr</code> multiple times in same script?</p>