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


Python Logs.free_logger方法代码示例

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


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

示例1: finalize

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import free_logger [as 别名]
 def finalize(self):
     try:
         logger = self.logger
     except AttributeError:
         pass
     else:
         Logs.free_logger(logger)
         delattr(self, "logger")
开发者ID:Gnurou,项目名称:glmark2,代码行数:10,代码来源:Context.py

示例2: finalize

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import free_logger [as 别名]
	def finalize(self):
		"""
		Use to free resources such as open files potentially held by the logger
		"""
		try:
			logger = self.logger
		except AttributeError:
			pass
		else:
			Logs.free_logger(logger)
			delattr(self, 'logger')
开发者ID:Jajcus,项目名称:jack2,代码行数:13,代码来源:Context.py

示例3: finalize

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import free_logger [as 别名]
	def finalize(self):
		"""
		Called to free resources such as logger files
		"""
		try:
			logger = self.logger
		except AttributeError:
			pass
		else:
			Logs.free_logger(logger)
			delattr(self, 'logger')
开发者ID:fedepell,项目名称:waf,代码行数:13,代码来源:Context.py

示例4: benchmarks_format_output

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import free_logger [as 别名]
def benchmarks_format_output (bch):
	# The logger is freed at the end of the benchmarks function but the tasks are
	# performed afterwards, so we recreate the logger.
	logfile = os.path.join (bch.bldnode.abspath(), "benchmarks_run.log")
	bch.logger = Logs.make_logger (logfile, "benchmarks_run")

	lst = sorted (getattr (bch, 'bench_results', []), key = lambda x:x[0])
	for (f, ret, log) in lst:
		bch.start_msg (f.relpath ())
		if ret == 0:
			bch.end_msg (log.relpath())
		else:
			bch.end_msg ("Error", color = "RED")

	Logs.free_logger (bch.logger)
	bch.logger = None
开发者ID:SimonRohou,项目名称:ibex-lib,代码行数:18,代码来源:waf_benchmarks.py


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