':param clear_other_handlers - if true, clear out all other logging
handlers.'

def _do_redirect(self, stream=None, filename=None, level=None, clear_other_handlers=False):

    assert (bool(stream) != bool(filename))
    if (not self._started):
        raise RuntimeError('You    must    call    start_logging()    before    this')
    def add_handler(context):
        if clear_other_handlers:
            self._clear_all_handlers()
        if stream:
            handler = self.logging_config_object.add_stream_handler(stream)
        else:
            handler = self.logging_config_object.add_file_handler(filename)
        if level:
            handler.setLevel(level)
    self._add_log_handlers(add_handler)
