def stop(self):

        handler = self.handler
        if handler is not None:

            logger = logging.getLogger(__name__)
            logger.removeHandler(handler)

            handler.close()
            self.handler = None

        strbuf = self.strbuf
        if strbuf is not None:
            return strbuf.getvalue()
        else:
            return ""

    # -------------------------------------------------------------------------
Stop recording S3Log messages (and return the messages)
dataset/ETHPy150Open sahana/eden/modules/s3log.py/S3LogRecorder.stop