Solution

找到配置文件 /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 可以了