def emit(self, record):
        """Try to log the message to QGIS if available, otherwise do nothing.

        :param record: logging record containing whatever info needs to be
                logged.
        """
        try:
            # Check logging.LogRecord properties for lots of other goodies
            # like line number etc. you can get from the log message.
            QgsMessageLog.logMessage(record.getMessage(), 'InaSAFE', 0)
        except MemoryError:
            message = tr(
                'Due to memory limitations on this machine, InaSAFE can not '
                'handle the full log')
            print(message)
            QgsMessageLog.logMessage(message, 'InaSAFE', 0)
def emit ( self , record ) : try : QgsMessageLog . logMessage ( record . getMessage ( ) , 'InaSAFE' , 0 ) except MemoryError : message = tr ( 'Due to memory limitations on this machine, InaSAFE can not ' 'handle the full log' ) print ( message ) QgsMessageLog . logMessage ( message , 'InaSAFE' , 0 )
Try to log the message to QGIS if available, otherwise do nothing.

        :param record: logging record containing whatever info needs to be
                logged.