def listen(self):
        """ Start recording S3Log messages """
        
        if self.handler is None:
            return
        strbuf = self.strbuf
        if strbuf is None:
            try:
                from cStringIO import StringIO
            except:
                from StringIO import StringIO
            strbuf = StringIO()
        handler = logging.StreamHandler(strbuf)
        
        logger = logging.getLogger(__name__)
        logger.addHandler(handler)
        
        self.handler = handler
        self.strbuf = strbuf
        return

    # -------------------------------------------------------------------------
dataset/ETHPy150Open sahana/eden/modules/s3log.py/S3LogRecorder.listen/operator `is not` -> `is`