我想用journal.Reader阅读我的fedora日志文件,但是下面的代码:
from systemd import journal
j = journal.Reader()
j.this_boot()
j.log_level(journal.LOG_DEBUG)
# j.add_match(_BOOT_ID="0")
for entry in j:
print(entry['MESSAGE'])似乎是无限期的循环。我不明白为什么或者如何获得当前的引导(_BOOT_ID=0)。
谢谢
发布于 2017-09-28 15:23:58
我必须添加一个匹配项,比如:_transport=‘内核’,现在它可以做我想做的事情了。:)
https://stackoverflow.com/questions/46472647
复制相似问题