linux – 使用rsyslogd在本地和远程进行日志记录

如何使用rsyslog远程和本地存储日志文件?
最佳答案
它看起来像配置文件中的两行一样简单:

*.* @loghost
*.* /var/log/messages

rsyslog example configs有几个像这样的发球实例.关键一:

kern.* /var/adm/kernel
kern.crit @finlandia;RFC3164fmt
kern.crit /dev/console
kern.info;kern.!err /var/adm/kernel-info

The second statement directs all kernel messages of the priority crit and 
higher to the remote host finlandia.
[...]
The third rule directs these messages to the actual console, so the person 
who works on the machine will get them, too.

转载注明原文:linux – 使用rsyslogd在本地和远程进行日志记录 - 代码日志