import logging # 简单打印日志举例 logging.basicConfig(level=logging.DEBUG) # 设置日志级别,WARN logging.warning('Watch out!') # will print a message to the console logging.info('I told you so') # will not print anything # 打印日志到文件,注意要新起一个文件,否则不能保存文件 def log_to_file(…
原文链接:linux简单之美(二) 我们在前一章中看到了如何仅仅用syscall做一些简单的事,现在我们看能不能直接调用C标准库中的函数快速做一些"复杂"的事: section .data ft db section .text extern puts extern exit extern sleep extern printf global main main: again: dec edi push edi push ft call printf call sleep jnz ag…