'Enable or disable logging of all messages.
@param enable if True (default), enables logging; otherwise disables
@return True if enabled, False otherwise'

def enableLogging(self, enable=True):

    if enable:
        self.registerAll(self.logMessage)
    else:
        self.unregisterAll(self.logMessage)
    return enable
