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


Python logger.info函数代码示例

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


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

示例1: __init__

 def __init__(self, path=None, name=None, egg=None):
   '''
   Try to register a new plugin.
   
   @path=Path to the plugin
   @name=Name of the plugin it self
   @egg=True if the plugin is stored into an egg file
   '''
   if not egg:
     self.path = os.path.join(path, name)
   else:
     self.path = path
   if not egg:
     self.name = 'plugins.%s' % name
   else:
     self.name = name
   self.egg = egg
   if not self.egg:
     self.__loadFromFile(self.path)
   else:
     self.__loadFromEgg(self.path)
   self.enabled = self.provides.get('enabled', False)
   self.__module = None
   self.__version = None
   self.__version_info = None
   self.__rpc = None
   logger.info("Plugin: %s registered" % self.name)
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:27,代码来源:pluginsystem.py

示例2: endConnection

	def endConnection(self, exit=True):
		self.shellPushIntoHistory(time.time())
		
		time.sleep(2)
		if exit:
			logger.info("Sending exit")
			self.shellExit()
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:7,代码来源:sppBase.py

示例3: handle_connection

    def handle_connection(self, conn, remote):
        request = conn.recv(4096)
        conn.setblocking(0)
        command, url = request.splitlines()[0].split()[:2]
        if command.strip() != "GET":
            conn.shutdown(sk.SHUT_RDWR)
            conn.close()
            return True

        if url.strip() != "/":
            conn.shutdown(sk.SHUT_RDWR)
            conn.close()
            return True

        logger.info("Got a connection to the http stream, redirecting")
        host = ""
        for line in request.splitlines():
            if line.find("Host") > -1:
                host = line.strip().split()[1].split(":", 1)[0]

        conn.sendall("HTTP/1.0 200 OK\r\n")
        conn.sendall("Content-type:multipart/x-mixed-replace; boundary=--myboundary\r\n")
        conn.sendall("\r\n")
        self.clientsockets[remote] = conn
        logger.info("Connection ready for streamming")
        return True
开发者ID:jpancier,项目名称:proximitymarketing,代码行数:26,代码来源:streamserver.py

示例4: handle_file_failed

def handle_file_failed(dongle, remote, pending, channel, files, ret, err, services):
    logger.info("handle file failed %s[%s]: %s" % (remote, channel, files))
    logger.debug(err)
    try:
        try_again = []
	rules = get_campaign_rule(files)
        if rules is None or len(rules)==0:
            raise Exception("Couldn't find rule")

        for rule in rules:
            record = save_file_failed(rule, dongle, ret, remote)

    	    # from here we try again either on timeout or if rejected count is 
    	    # smaller than filter
    	    if rule.tryAgain(record=record):
    		try_again.append(rule)

	# if we can't try again this method will raise an exception
	# and the try/catch will make sure the remote device gets out
	# of our pending list
    	if upload_after_rejected(try_again, services, dongle=dongle, remote=remote):
    	    return
    except Exception, err:
        logger.error("OOOPS!!!")
        logger.exception(err)
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:25,代码来源:uploader.py

示例5: on_disconnect

 def on_disconnect(self):
     a = [ p for p in pending if pending[p]==self]
     if len(a) > 0:
        logger.info("a client disconnected, clearing %s pending transactions" % len(a))
        for p in a:
            pending.pop(p)
     services.remove(self)
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:7,代码来源:rpc.py

示例6: exposed_setConcurrent

    def exposed_setConcurrent(self, val):
	'''
	Exposed method that lets the server tell us if we should do concurrent 
	scanning (all the scanners work at the same time), or sequence scanning.
	'''
        self.concurrent = val
        logger.info("setConcurrent %s" % val)
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:7,代码来源:scanner.py

示例7: exposed_uploader_register

        def exposed_uploader_register(self, client = None,
    					    remote_quit=None, 
    					    dongles=None):
            global enabled
            all_dongles.update(dongles)
            self.dongles = set()
            self.add_dongle = async(client.add_dongle)
            self.upload = async(client.upload)
            self.remote_quit = async(remote_quit)
            self.refreshUploaders = async(client.refreshUploaders)

            self.uploader = client

            if not enabled:
                return

            if not db_ready():
        	return

            logger.info("uploader register")
            for dongle in dongles:
                self.dongles.add( str(dongle), )

            for dongle, max_conn, name in rpc.uploader.get_dongles(dongles):
                logger.info("%s: %s[%s]" % (dongle, name, max_conn))
                self.add_dongle(dongle, max_conn, name)
            self.refreshUploaders()
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:27,代码来源:rpc.py

示例8: handle_parent

def handle_parent(signum, frame):
    '''
    When the parent gets the kill signal it will stop it self no forking more
    childrens.
    '''
    logger.info("Parent killed, doing exit")
    sys.exit(0)
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:7,代码来源:autoreload.py

示例9: latest_picture

def latest_picture(request):
    try:
	b = models.CameraRecord.objects.latest('time').picture.name
    except:
	b = None
    logger.info(b)
    return HttpResponse( json.dumps({'name': b}), 'application/json')
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:7,代码来源:views.py

示例10: handle_adapter_added_or_removed

def handle_adapter_added_or_removed(path, signal):
    '''
    When ever a dongle is added or removed this function gets called, so we can
    restart the rpc client.
    '''
    logger.info("bluez.%s: %s" % (signal, path))
    stop()
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:7,代码来源:manager.py

示例11: started

def started(scanner, address):
    logger.info('scan_started %s' % address)
    dongle = ScannerBluetoothDongle.objects.get(address=address)
    record = DeviceRecord()
    record.action = signals.CYCLE_SCAN_DONGLE
    record.dongle = dongle
    record.save()
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:7,代码来源:scanner.py

示例12: disconnect

	def disconnect(self, force=False):
	    if not force:
		self.checkConnected("Can't close if it's opened");
	    logger.info("Closing socket");
	    self.socket.shutdown(socket.SHUT_RDWR);
	    self.socket.close()
	    self.socket = None
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:7,代码来源:sppBase.py

示例13: handle_sdp_timeout

def handle_sdp_timeout(dongle, remote, pending):
    logger.info("SDP timeout: %s" % remote )
    pending.pop(remote)
    record = RemoteBluetoothDeviceSDPTimeout()
    record.dongle = UploaderBluetoothDongle.objects.get(address=dongle)
    record.setRemoteDevice(remote)
    record.save()
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:7,代码来源:uploader.py

示例14: __restart_server

def __restart_server():
    logger.info("restarting server")
    try:
        server = rpyc.connect('localhost', 8010)
        server.root.restart()
    except:
        #could be that we're only running the web server
        pass
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:8,代码来源:models.py

示例15: handle_name_owner_changed

    def handle_name_owner_changed(self, own, old, new):
	''' detect if a name owner is gone, this prevents dead locks '''
	if own in self.connections:
	    if new is None or len(new) is 0:
		for client in self.connections[own]:
		    logger.info("%s lost connection, killing it" % client.path)
		    client.force_disconnect()
		self.connections[own] = None
开发者ID:Nyophyte,项目名称:proximitymarketing,代码行数:8,代码来源:remotescanner.py


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