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


Python clog.info函数代码示例

本文整理汇总了Python中tools.clog.info函数的典型用法代码示例。如果您正苦于以下问题:Python info函数的具体用法?Python info怎么用?Python info使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: onOpen

 def onOpen(self):
     clog.info('(onOpen) Connected to Cytube!', sys)
     self.connectedTime = time.time()
     self.lastUserlistTime = 0
     self.factory.prot = self
     self.factory.handle.cy = True
     self.initialize()
开发者ID:Twirlie,项目名称:Yukari,代码行数:7,代码来源:cyClient.py

示例2: deferredChatRes

 def deferredChatRes(self, res, key):
     if not res:
         clog.info('(deferredChatRes): wrote chat to database!', sys)
         return defer.succeed(key)
     else:
         clog.err('(deferredChatRes): error writing to database!', sys)
         return defer.fail(key)
开发者ID:Twirlie,项目名称:Yukari,代码行数:7,代码来源:cyClient.py

示例3: bulkCheckVocaDb

 def bulkCheckVocaDb(self, songlessMedia):
     timeNow = round(time.time(), 4)
     clog.info('(bulkCheckVocaDb)', sys)
     for i, (mType, mId) in enumerate(songlessMedia):
         # 0.5s delay between each call
         reactor.callLater(i * 0.5, vdbapi.requestSongByPv, None, mType, mId,
                           1, timeNow, 4)
开发者ID:Twirlie,项目名称:Yukari,代码行数:7,代码来源:cyClient.py

示例4: cacheKey

 def cacheKey(self, res, nickname):
     clog.error('the key is %s:' % res[0], sys)
     assert res, 'no res at cacheKey'
     if res:
         clog.info("(cacheKey) cached %s's key %s" % (nickname, res[0]))
         self.nickdict[nickname]['keyId'] = res[0]
         return defer.succeed(res[0])
开发者ID:Twirlie,项目名称:Yukari,代码行数:7,代码来源:ircClient.py

示例5: _cyCall_delete

 def _cyCall_delete(self, fdict):
     uid = fdict['args'][0]['uid']
     index = self.getIndexFromUid(uid)
     deletedMedia = self.playlist.pop(index)
     clog.info('(_cyCall_delete) Removed uid %s, index %s from my playlist' %
               (uid, index), sys)
     assert uid == deletedMedia['uid'], 'Deleted media not correct!'
开发者ID:Twirlie,项目名称:Yukari,代码行数:7,代码来源:cyClient.py

示例6: userJoined

 def userJoined(self, user, channel):
     clog.info('%s has joined %s' % (user, channel), sys)
     if channel == self.channelName:
         self.factory.handle.ircUserCount += 1
         self.nicklist.append(user)
     elif channel == self.channelStatus:
         self.sendCyNames()
开发者ID:d-dd,项目名称:Yukari,代码行数:7,代码来源:ircClient.py

示例7: userLeft

 def userLeft(self, user, channel):
     clog.info('%s has left %s' % (user, channel), sys)
     if channel == self.channelName:
         self.factory.handle.ircUserCount -= 1
         try:
             self.nicklist.remove(user)
         except(ValueError):
             clog.error('(userLeft) User %s not in nicklist' % user)
开发者ID:d-dd,项目名称:Yukari,代码行数:8,代码来源:ircClient.py

示例8: left

 def left(self, channel):
     clog.info('Left IRC channel: %s' % channel, sys)
     if channel == config['irc']['channel']:
         self.factory.handle.inIrcChan = False
     elif channel == config['irc']['np']:
         self.factory.handle.inIrcNp = False
     elif channel == config['irc']['status']:
         self.factory.handle.inIrcStatus = False
开发者ID:d-dd,项目名称:Yukari,代码行数:8,代码来源:ircClient.py

示例9: clockUser

 def clockUser(self, res, leftUser, timeNow):
     """ Clock out a user, by updating their accessTime """
     username = leftUser['name']
     clog.info('(clockUser) Clocking out %s!' % username, sys)
     timeJoined = leftUser['timeJoined']
     timeStayed = timeNow - timeJoined
     userId = leftUser['keyId']
     return database.updateCyUser(timeNow, timeStayed, userId)
开发者ID:Twirlie,项目名称:Yukari,代码行数:8,代码来源:cyClient.py

示例10: cleanup

 def cleanup(self):
     """ Prepares for shutdown """
     clog.info('(cleanup) Cleaning up for shutdown!', sys)
     self.done = Deferred()
     if self.irc:
         self.ircFactory.prot.partLeave('Shutting down.')
     if self.cy:
         self.wsFactory.prot.cleanUp()
     return self.done
开发者ID:Twirlie,项目名称:Yukari,代码行数:9,代码来源:yukari.py

示例11: userKicked

 def userKicked(self, kickee, channel, kicker, message):
     clog.info('%s was kicked by %s from %s: %s' %
               (kickee, kicker, channel, message))
     if channel == self.channelName:
         self.factory.handle.ircUserCount -= 1
         try:
             self.nicklist.remove(kickee)
         except(ValueError):
             clog.error('(userKiced) User %s not in nicklist' % kickee)
开发者ID:d-dd,项目名称:Yukari,代码行数:9,代码来源:ircClient.py

示例12: _cyCall_changeMedia

 def _cyCall_changeMedia(self, fdict):
     # set self.nowPlaying
     mType = fdict['args'][0]['type']
     mId = fdict['args'][0]['id']
     mTitle = fdict['args'][0]['title']
     self.nowPlaying = (mType, mId, mTitle) # these are unicode
     # everything has to be encoded to utf-8 or it errors
     s = mTitle.encode('utf-8') + ' (%s, %s)' % (mType.encode('utf-8'),
         mId.encode('utf-8'))
     clog.info('(_cyCall_changeMedia) %s' % s, sys)
开发者ID:Twirlie,项目名称:Yukari,代码行数:10,代码来源:cyClient.py

示例13: mediaSongResult

def mediaSongResult(res, mType, mId, userId, timeNow):
    clog.info("(mediaSongResult) %s" % res, syst)
    if res:
        return defer.succeed(res[0])
    else:
        dd = requestApiByPv(mType, mId, timeNow)
        method = 0
        dd.addErrback(apiError)
        dd.addCallback(database.insertMediaSongPv, mType, mId, userId, timeNow, method)
        return dd
开发者ID:Twirlie,项目名称:Yukari,代码行数:10,代码来源:vdbapi.py

示例14: joined

 def joined(self, channel):
     clog.info('Joined IRC channel: %s' % channel, sys)
     self.factory.handle.irc = True
     if channel == self.channelName:
         self.factory.handle.inIrcChan = True
     elif channel == self.channelNp:
         self.factory.handle.inIrcNp = True
     elif channel == self.channelStatus:
         self.factory.handle.inIrcStatus = True
         self.sendCyNames()
     self.getNicks(channel).addCallback(self.updateNicks, channel)
开发者ID:d-dd,项目名称:Yukari,代码行数:11,代码来源:ircClient.py

示例15: processVocadb

 def processVocadb(self, res, mType, mId, nameLower, isReg, isCommand):
     if not res:
         d = vdbapi3.obtainSong(mType, mId, nameLower, isReg)
         if isCommand:
             clog.info('(processVocadb) we got $vocadb command', syst)
         else:
             clog.info('(processVocadb) Vocadb db query returned [] ', syst)
             d.addCallback(self.displayResults, mType, mId, nameLower, isReg)
         return d
     else:
         return self.displayResults(res, mType, mId, nameLower, isReg)
开发者ID:d-dd,项目名称:Yukari,代码行数:11,代码来源:vocadb.py


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