找到配置文件 /etc/rsyslog.conf
修改如下:
解注释:#$ModLoad imklog # reads kernel messages (the same are read from journald)
修改为:$ModLoad imklog # reads kernel messages (the same are read from journald)
增加注释:$OmitLocalLogging on
修改为:#$OmitLocalLogging on
增加注释:$IMJournalStateFile imjournal.state
修改为:#$IMJournalStateFile imjournal.state
重启日志:systemctl restart rsyslog
tai日志:tail -f /var/log/messages 可以了
————————————————
版权声明:本文为CSDN博主「TianXieErYang」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/tianxieeryang/java/article/details/86220988