def __init__(self, iface): QgsMessageLog.logMessage("Starting featuresWithGPS ... ", tag="TOMs panel") """Constructor. :param iface: An interface instance that will be passed to this class which provides the hook by which you can manipulate the QGIS application at run time. :type iface: QgsInterface """ # Save reference to the QGIS interface self.iface = iface # initialize plugin directory self.plugin_dir = os.path.dirname(__file__) self.actions = [] # ?? check - assume it initialises array of actions self.closeGPSToolsFlag = False # Set up local logging loggingUtils = TOMsMessageLog() loggingUtils.setLogFile() QgsMessageLog.logMessage("In featuresWithGPS. Finished init", tag="TOMs panel")
def __init__(self, iface): QgsMessageLog.logMessage("Starting TOMs ... ", tag='TOMs Panel', level=Qgis.Warning) """Constructor. # Monkeypatch to avoid slowdown because of logging # FIXME : create own logger function and replace calls to # QgslogMessage all over the code instead """ """ logMessage = QgsMessageLog.logMessage def mute(*args, **kwargs): if kwargs.get('tag') == 'TOMs panel': pass else: logMessage(*args, **kwargs) QgsMessageLog.logMessage = mute QgsMessageLog.logMessage("AM I MUTE ? yes i am", tag="TOMs panel") QgsMessageLog.logMessage("ARE OTHER MUTE ? no they arent") """ """ :param iface: An interface instance that will be passed to this class which provides the hook by which you can manipulate the QGIS application at run time. :type iface: QgsInterface """ # Save reference to the QGIS interface self.iface = iface # initialize plugin directory #self.plugin_dir = os.path.dirname(__file__) # Declare instance attributes self.actions = [] # ?? check - assume it initialises array of actions # Set up local logging loggingUtils = TOMsMessageLog() loggingUtils.setLogFile() TOMsMessageLog.logMessage("Finished init", level=Qgis.Warning)