def __init__(self, iface):
        self.iface = iface
        config.iface = iface

        class QgisLogHandler(logging.Handler):
            def __init__(self):
                logging.Handler.__init__(self)

            def emit(self, record):
                try:
                    QgsMessageLog.logMessage(self.format(record), "GeoGig")
                except AttributeError: #prevent error in case the log object is None
                    pass

        logFile = os.path.join(userFolder(), "geogig.log")
        handler = logging.FileHandler(logFile)
        logger.setLevel(logging.DEBUG)
        formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
        handler.setFormatter(formatter)
        handler.setLevel(logging.DEBUG)
        logger.addHandler(handler)
        qgisHandler = QgisLogHandler()
        qgisFormatter = logging.Formatter('%(levelname)s - %(message)s')
        qgisHandler.setFormatter(qgisFormatter)
        qgisHandler.setLevel(logging.DEBUG)
        logger.addHandler(qgisHandler)

        config.initConfigParams()
    def __init__(self, iface):
        self.iface = iface
        config.iface = iface

        config.initConfigParams()

        layers = list(QgsMapLayerRegistry.instance().mapLayers().values())
        for layer in layers:
            trackLayer(layer)
        try:
            from qgistester.tests import addTestModule
            from geogig.tests import testplugin
            addTestModule(testplugin, "GeoGig Light")
        except Exception as e:
            pass

        QSettings().setValue("/qgis/walForSqlite3", False)
    def __init__(self, iface):
        self.iface = iface
        config.iface = iface
        readSettings()
        config.initConfigParams()

        layers = list(QgsMapLayerRegistry.instance().mapLayers().values())
        for layer in layers:
            trackLayer(layer)
        try:
            from qgistester.tests import addTestModule
            from geogig.tests import testplugin
            addTestModule(testplugin, "GeoGig Light")
        except Exception as e:
            pass

        QSettings().setValue("/qgis/walForSqlite3", False)
Beispiel #4
0
    def __init__(self, iface):
        self.iface = iface
        config.iface = iface

        class QgisLogHandler(logging.Handler):
            def __init__(self):
                logging.Handler.__init__(self)

            def emit(self, record):
                try:
                    QgsMessageLog.logMessage(self.format(record), "GeoGig")
                except AttributeError:  #prevent error in case the log object is None
                    pass

        logFile = os.path.join(userFolder(), "geogig.log")
        handler = logging.FileHandler(logFile)
        logger.setLevel(logging.DEBUG)
        formatter = logging.Formatter(
            '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
        handler.setFormatter(formatter)
        handler.setLevel(logging.DEBUG)
        logger.addHandler(handler)
        qgisHandler = QgisLogHandler()
        qgisFormatter = logging.Formatter('%(levelname)s - %(message)s')
        qgisHandler.setFormatter(qgisFormatter)
        qgisHandler.setLevel(logging.DEBUG)
        logger.addHandler(qgisHandler)

        config.initConfigParams()

        layers = QgsMapLayerRegistry.instance().mapLayers().values()
        for layer in layers:
            if layer not in trackers:
                trackLayer(layer)
        try:
            from qgistester.tests import addTestModule
            from geogig.tests import testplugin
            addTestModule(testplugin, "GeoGig")
        except Exception as e:
            pass
    def __init__(self, iface):
        self.iface = iface
        config.iface = iface

        class QgisLogHandler(logging.Handler):
            def __init__(self):
                logging.Handler.__init__(self)

            def emit(self, record):
                try:
                    QgsMessageLog.logMessage(self.format(record), "GeoGig")
                except AttributeError: #prevent error in case the log object is None
                    pass

        logFile = os.path.join(userFolder(), "geogig.log")
        handler = logging.FileHandler(logFile)
        logger.setLevel(logging.DEBUG)
        formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
        handler.setFormatter(formatter)
        handler.setLevel(logging.DEBUG)
        logger.addHandler(handler)
        qgisHandler = QgisLogHandler()
        qgisFormatter = logging.Formatter('%(levelname)s - %(message)s')
        qgisHandler.setFormatter(qgisFormatter)
        qgisHandler.setLevel(logging.DEBUG)
        logger.addHandler(qgisHandler)

        config.initConfigParams()

        layers = QgsMapLayerRegistry.instance().mapLayers().values()
        for layer in layers:
            if layer not in trackers:
                trackLayer(layer)
        try:
            from qgistester.tests import addTestModule
            from geogig.tests import testplugin
            addTestModule(testplugin, "GeoGig")
        except Exception as e:
            pass