本文整理汇总了Python中logger.LOGGER.debug方法的典型用法代码示例。如果您正苦于以下问题:Python LOGGER.debug方法的具体用法?Python LOGGER.debug怎么用?Python LOGGER.debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类logger.LOGGER
的用法示例。
在下文中一共展示了LOGGER.debug方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: rename
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def rename(self, path, path1):
# Rename is handled by copying and deleting files...
LOGGER.debug("rename %s %s" % (path, path1))
d = self.get_dir(path)
if self.is_valid_file(path) and d.is_file(path):
if not self.is_valid_file(path1):
# from a valid file to an editor file
buf = self.get_file_buf(path1)
buf.write(d.read_file(path))
# TODO : remove path ?
else:
# from a valid file to a valid file
# if rename is defined
# TODO : with unlink method defined in fs
pass
elif not self.is_valid_file(path):
if self.is_valid_file(path1) and d.is_file(path1):
# from an editor file to a valid file
buf = self.get_file_buf(path)
ret = d.write_to(path1, buf.getvalue())
self.open_mode = None
self.remove_file_buf(path)
if ret == False:
return -errno.EIO
elif not self.is_valid_file(path):
# from an editor file to an editor file
# TODO
pass
示例2: checkTrame
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def checkTrame(self):
if self.trameUsed:
LOGGER.debug("Trame received : {}".format(self.trameUsed.lessRawView()))
if ("A55A" not in self.trameUsed.sep):
LOGGER.warn("Wrong separator, rejected")
if (self.doChecksum(self.trameUsed) not in self.trameUsed.checkSum):
#Mauvais checkSum
LOGGER.warn("Wrong checksum, expected : {}, rejected".format(self.doChecksum(self.trameUsed)))
with self.lock:
if (self.trameUsed.ident in self.identSet):
#Recuperer le capteur en bdd
sensorUsed = sensor.Sensor.objects(physic_id=self.trameUsed.ident)[0]
newData = '' #la nouvelle data a entrer en base, type dynamique
if (sensorUsed.__class__.__name__=="Switch"):
newData=sensorUsed.translateTrame(self.trameUsed)
elif (sensorUsed.__class__.__name__=="Temperature"):
newData = sensorUsed.translateTrame(self.trameUsed)
elif (sensorUsed.__class__.__name__=="Position"):
newData = sensorUsed.translateTrame(self.trameUsed)
else :
LOGGER.warn("Other Captor (not handle (YET !) )")
# Update de la trame au niveau de la base
if newData :
sensorUsed.update(newData)
LOGGER.info(" Sensor {} ||New data {}".format(sensorUsed.physic_id, sensorUsed.current_state))
self.trameUsed=''
示例3: updateIdentSet
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def updateIdentSet(self):
"""
Safely update the identifier set of the traductor
"""
for anUpdate in lazzyUpdate.objects:
LOGGER.warn("id : {} || state : {}".format(anUpdate.idToUpdate,anUpdate.newState))
if(anUpdate.idToUpdate==""):
with self.lock:
self.identSet=set([])
for lsensor in sensor.Sensor.objects:
self.identSet.add(lsensor.physic_id)
LOGGER.info(lsensor.physic_id)
LOGGER.info("Traductor's set of captors updated")
elif(anUpdate.newState==""):
with self.lock:
if (anUpdate.idToUpdate in things.physic_id for things in sensor.Sensor.objects):
self.identSet.add(anUpdate.idToUpdate)
LOGGER.info("{} added".format(anUpdate.idToUpdate))
else:
#send a trame from a captor with a newState
LOGGER.error("Sensor to update : {} ||new state : {}".format(anUpdate.idToUpdate,anUpdate.newState))
self.sendTrame(anUpdate.idToUpdate,anUpdate.newState)
anUpdate.delete()
LOGGER.warn(" {} update GROS delete de : {} || {}".format(lazzyUpdate.objects.count(),anUpdate.idToUpdate,anUpdate.newState))
return
LOGGER.debug("nothing to update")
示例4: update_issue_status
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def update_issue_status(status_list):
for item in status_list:
status = item['status'].upper()
key = item['key']
update_query = DbJiraIssues.update(dc_status=status).where(DbJiraIssues.key == key)
update_query.execute()
LOGGER.debug(update_query)
示例5: unlink
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def unlink(self, path):
LOGGER.debug("FSdir unlink %s" % (path))
file_name = self.get_article_file_name(path)
if self.files.has_key(file_name):
self.files.pop(file_name)
return True # succeeded
else:
return False
示例6: receive
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def receive (self) :
# LOGGER.debug("en attente de trame")
message = self.soc.recv(1024)
if message and len(message)==28:
LOGGER.debug("trame reçu : {}".format(message))
self.trameUsed = Trame.trame(message)
else :
return
示例7: utime
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def utime(self, path, times):
LOGGER.debug("utime %s %s" % (path, times))
d = self.get_dir(path)
if dir(d).count("utime") == 0:
return -errno.ENOSYS # Not implemented
else:
return d.utime(path, times)
示例8: open
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def open(self, path, flags):
LOGGER.debug("open %s %d" % (path, flags))
if not self.files.has_key(path):
if self.is_valid_file(path):
buf = self.get_file_buf(path)
d = self.get_dir(path)
txt = d.read_file(path)
buf.write(txt)
示例9: read
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def read(self, path, size, offset):
LOGGER.debug("read %s %d %d" % (path, size, offset))
self.open_mode = self.READ
buf = self.get_file_buf(path)
buf.seek(offset)
return buf.read(size)
示例10: mkdir
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def mkdir(self, path, mode):
LOGGER.debug("mkdir %s %x" % (path, mode))
d = self.get_dir(path)
if dir(d).count("mkdir") == 0:
return -errno.EACCES # Permission denied
else:
res = d.mkdir(path)
if res != True:
return -errno.EACCES # Permission denied
示例11: rmdir
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def rmdir(self, path):
LOGGER.debug("rmdir %s" % path)
d = self.get_dir(path)
if dir(d).count("rmdir") == 0:
return -errno.EACCES # Permission denied
else:
res = d.rmdir(path)
if res != True:
return -errno.EACCES # Permission denied
示例12: write
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def write(self, path, txt, offset):
LOGGER.debug("write %s [...] %d" % (path, offset))
self.open_mode = self.WRITE
buf = self.get_file_buf(path)
buf.seek(offset)
buf.write(txt)
return len(txt)
示例13: get_issues
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def get_issues(self, issues, limit=300):
result = []
keys = ','.join(issues)
request = 'project=%s AND key in (%s)' % (self.settings.project, keys)
LOGGER.debug(request)
response = self.proxy.getIssuesFromJqlSearch(self.get_token(), request, Types.intType(limit))
for item in response:
issue = JiraIssue()
issue.parse_raw(item)
result.append(issue)
return result
示例14: truncate
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def truncate(self, path, size):
# Truncate is called just before open when a file is to be written
# in order to make it empty
LOGGER.debug("truncate %s %d" % (path, size))
buf = self.get_file_buf(path)
if self.is_valid_file(path):
d = self.get_dir(path)
txt = d.read_file(path)
buf.write(txt)
buf.truncate(size)
示例15: create
# 需要导入模块: from logger import LOGGER [as 别名]
# 或者: from logger.LOGGER import debug [as 别名]
def create(self, path, mode, dev):
# create is called to write a file that does not exist yet
LOGGER.debug("create %s %d %d" % (path, mode, dev))
if self.is_valid_file(path):
d = self.get_dir(path)
# We also need to check if it is a valid file for the fs
if dir(d).count("is_valid_file") == 1 and not d.is_valid_file(path):
return -errno.EACCES # Permission denied
else:
return -errno.EACCES # Permission denied
self.get_file_buf(path)