本文整理汇总了Python中system.MogamiLog.critical方法的典型用法代码示例。如果您正苦于以下问题:Python MogamiLog.critical方法的具体用法?Python MogamiLog.critical怎么用?Python MogamiLog.critical使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类system.MogamiLog
的用法示例。
在下文中一共展示了MogamiLog.critical方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: release
# 需要导入模块: from system import MogamiLog [as 别名]
# 或者: from system.MogamiLog import critical [as 别名]
def release(self, flags):
if conf.ap is True:
start_t = time.time()
MogamiLog.debug("** release **")
MogamiLog.critical("** file log ** file:%s\tcmd:%s\tlocal:%s\tread:%s\twrite:%s" % (
self.path, self.cmd, str(self.local), str(self.read_size), str(self.write_size)))
fsize = self.mogami_file.release(flags)
ans = m_channel.release_req(self.path, fsize)
# delete file size cache
if self.path in file_size_dict:
del file_size_dict[self.path]
if conf.ap is True:
# prepare data to tell access pattern
myname = m_channel.getmyname()
(read_data, write_data) = self.access_pattern.mk_form_data()
pid = self.access_pattern.pid
cmd_args = self.access_pattern.cmd_args
path = self.access_pattern.path
# get pids of parents
parents_list = self.access_pattern.parents_list
end_t = time.time()
self.took_time += end_t - start_t
# put file access history to repository
if cmd_args != None:
file_access_rep.put_ap((cmd_args, pid, path, myname,
self.took_time, self.created,
read_data, write_data),
pid, parents_list)
return 0