当前位置: 首页>>代码示例>>Python>>正文


Python Logger.logInfo方法代码示例

本文整理汇总了Python中gamit.log.logger.Logger.logInfo方法的典型用法代码示例。如果您正苦于以下问题:Python Logger.logInfo方法的具体用法?Python Logger.logInfo怎么用?Python Logger.logInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gamit.log.logger.Logger的用法示例。


在下文中一共展示了Logger.logInfo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: onMessage

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def onMessage(self, connId, payload, isBinary):
        Logger.logDebug("WsAcceptor.onMessage", connId)
        if connId not in self.connMap:
            Logger.logInfo("connId not found")
            return

        self.rmiServer.onMessage(connId, payload, isBinary)
开发者ID:bropony,项目名称:gamit,代码行数:9,代码来源:ws_acceptor.py

示例2: __initDatabase

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def __initDatabase(self, config):
        xml = xmlParser.parse(config)
        for child in xml.getroot():
            tag = child.tag
            text = child.text
            if tag == 'name':
                self.dbname = text
            elif tag == 'ip':
                self.dbip = text
            elif tag == 'port':
                self.dbport = int(text)
            elif tag == 'username':
                self.dbuser = text
            elif tag == 'passwd':
                self.dbpasswd = text

        if not self.dbname:
            Logger.logInfo("__Database.__initDatabase", "database name not specified")
            return False

        if not self.dbip:
            self.dbip = "127.0.0.1"

        if not self.dbport:
            self.dbport = 27017

        return True
开发者ID:bropony,项目名称:gamit,代码行数:29,代码来源:database.py

示例3: start

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def start(self, isDebug):
        wsUrl = "ws://{}:{}".format(self.ip, self.port)

        Logger.logInfo("Connecting to {}".format(wsUrl))
        factory = MyClientFactory(wsUrl, debug=isDebug)
        factory.connector__ = self
        reactor.connectTCP(self.ip, self.port, factory)

        self.factory = factory
开发者ID:bropony,项目名称:gamit,代码行数:11,代码来源:ws_connector.py

示例4: initServant

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def initServant(self):
        channel = ServerConfigManager.getChannelByType(AppType.DBCACHE)
        if not channel:
            Logger.logInfo("DBCACHE channel not configured.")
            return False

        rmiServer = self.createRmiServer(channel, ServerConfigManager.isDebug)
        ServantSetting.initServant(rmiServer)
        return True
开发者ID:bropony,项目名称:gamit,代码行数:11,代码来源:application.py

示例5: onOpen

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def onOpen(self):
        Logger.logInfo("ConnectionInfo", "Connected to dbcache")
        ConnectionInfo.setDbCacheOpen(True)

        if not DbCacheConnectCallback.isDataLoaded:
            UserDataLoader.loadUserInfos()
            ResourceLoader.load()

            DbCacheConnectCallback.isDataLoaded = True
开发者ID:bropony,项目名称:gamit,代码行数:11,代码来源:dbcacheback.py

示例6: onInvoke

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def onInvoke(self, connId, _is):
        try:
            interface = _is.readString()
            method = _is.readString()
            if interface in self.servantMap:
                self.servantMap[interface].invoke(connId, method, _is, self.beforeInvoke)
            else:
                raise SerializeError("Servant {} not registered".format(interface))
        except Exception as ex:
            Logger.logInfo(ex)
            # self.servantMap[interface].onError(connId, _is, ex)
#end of RmiServer
开发者ID:bropony,项目名称:gamit,代码行数:14,代码来源:rmiserver.py

示例7: _initDbLogProxy

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def _initDbLogProxy(self):
        channel = ServerConfigManager.getChannelByType(AppType.DBLOG)
        if not channel:
            Logger.logInfo("DbLog channel not configured.")
            return False

        dbConnCb = DbLogConnectCallback(channel)
        rmiClient = self.addProxyByChannel(channel, ServerConfigManager.isDebug, dbConnCb, dbConnCb, [True], [False])

        ProxySetting.initDbLogProxy(rmiClient)

        return True
开发者ID:bropony,项目名称:gamit,代码行数:14,代码来源:application.py

示例8: send

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def send(self, payload, isBinary=True):
        if not self.running:
            Logger.logInfo("WsConnector.send", " Connect closed")
            return

        try:
            #Logger.logDebug("connector.send")
            self.ws.sendMessage(payload, isBinary)
        except Exception as ex:
            Logger.logDebug(ex)
            Logger.log("[WsConnector.send]", ex)
            raise ex
开发者ID:bropony,项目名称:gamit,代码行数:14,代码来源:ws_connector.py

示例9: start

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def start(self, isDebug):
        wsUrl = "ws://{}:{}".format(self.ip, self.port)

        Logger.logInfo("Listening on {}".format(wsUrl))
        factory = WebSocketServerFactory(wsUrl, debug=isDebug)
        _WSServerProtocol.proxy = self
        factory.protocol = _WSServerProtocol

        reactor.listenTCP(self.port, factory)

        self.factory = factory
        self.running = True
开发者ID:bropony,项目名称:gamit,代码行数:14,代码来源:ws_acceptor.py

示例10: onOpen

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def onOpen(self):
        Logger.logInfo("ConnectionInfo", "Connected to dbcache")
        ConnectionInfo.setDbCacheOpen(True)

        proxy = ProxyManager.getProxy(AppType.DBCACHE, "IDbTest")
        if proxy:
            for i in range(10):
                msg = AnRmiTest()
                msg.ip = "{}".format(ServantSetting.getChannelId())
                msg.shortDesc = "Run, Chicken..."
                msg.passedTimes = i + ServantSetting.getChannelId() * 100
                proxy.sayhello(IDbTest_Sayhello_callback(), msg)
                print("Run, Chiken", i)
开发者ID:bropony,项目名称:gamit,代码行数:15,代码来源:dbcache.py

示例11: sayhello

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def sayhello(self, hello, _request):
        table = MongoDatabase.findTableByMessageType(AnRmiTest)
        if not table:
            raise Exception("Table Not Found")
        table.update(hello)

        res = table.findOne(hello.ip)
        if not res:
            raise Exception("Db Engine Error")

        Logger.logInfo("IDbTestImpl.sayhello", "response")
        _request.response(res)
        MessageManager.broadcast(ETestCommand.FirstMessage, res)
开发者ID:bropony,项目名称:gamit,代码行数:15,代码来源:idbtestimpl.py

示例12: onMessage

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
 def onMessage(self, connId, payload, isBinary):
     try:
         payload = simpleDecrypt(payload)
         _is = Serializer(payload)
         _is.startToRead()
         rmiType = _is.readByte()
         if rmiType == RmiDataType.RmiCall:
             self.onInvoke(connId, _is)
         elif rmiType == RmiDataType.MessageBlock:
             self.messageManager.onMessage(_is)
         else:
             raise SerializeError("Unknown RmiDataType")
     except Exception as ex:
         Logger.logInfo(ex)
开发者ID:bropony,项目名称:gamit,代码行数:16,代码来源:rmiserver.py

示例13: initTable

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def initTable(self, db):
        if not self.msgType:
            Logger.logInfo("struct {} is not defined".format(self.msgName))
            return False

        if not self.name in db.collection_names():
            if self.key:
                db[self.name].create_index([(self.key, ASCENDING)])

            for idx in self.indexes:
                db[self.name].create_index([(idx, ASCENDING)])

        self.table = db[self.name]
        return True
开发者ID:bropony,项目名称:gamit,代码行数:16,代码来源:table.py

示例14: initClient

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def initClient(self):
        channel = ServerConfigManager.getChannelByType(AppType.GATE)
        if not channel:
            Logger.logInfo("Gate channel not configured.")
            return False

        Logger.logInfo("Init Proxy {}:{}".format(channel.ip, channel.port))
        connector = Connector(channel.ip, channel.port)
        self.client = RmiClient(channel.type, connector, ServerConfigManager.isDebug)

        self.client.setOnOpenCallback(runTest)

        ProxySetting.initGateProxy(self.client)
        return True
开发者ID:bropony,项目名称:gamit,代码行数:16,代码来源:application.py

示例15: digest

# 需要导入模块: from gamit.log.logger import Logger [as 别名]
# 或者: from gamit.log.logger.Logger import logInfo [as 别名]
    def digest(self, systemCommand):
        """
        :type systemCommand: message.db.mongodb.utiltables.TSystemCommand
        :rtype: bool
        """
        operStatus = False

        if systemCommand.commandType == ESysCommandType.AddSysTopic:
            operStatus = self.__addSysTopic(systemCommand)
        elif systemCommand.commandType == ESysCommandType.AddCommercialAd:
            pass
        else:
            Logger.logInfo("__SystemCommandDigester.digest: undigested command type:", systemCommand.commandType)

        return operStatus
开发者ID:bropony,项目名称:gamit,代码行数:17,代码来源:digester.py


注:本文中的gamit.log.logger.Logger.logInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。