如何配置日志读取?

时间:2020-12-22 15:24:40

标签: embedded-linux

我需要将 logread 作为我的嵌入式系统上本地日志的默认日志阅读器。我已经在我的 Yocto 图像上使用 busybox 安装了它:

IMAGE_INSTALL += "busybox-syslog "

我通过以下启动配置文件配置了系统日志:

文件:/etc/syslog-startup.conf

DESTINATION=buffer # log destinations
LOGFILE=/var/log/messages # where to log
REMOTE=loghost:514 # where to log
REDUCE=no # reduce-size logging
DROPDUPLICATES=no # whether to drop duplicate log entries
BUFFERSIZE=2000 # size of circular buffer [kByte]
FOREGROUND=no # run in foreground (don't use!)

另外,其他syslog配置如下:

文件:/etc/syslog.conf

*.err;kern.*;auth.notice;authpriv.none /dev/console
*.info;mail.none;authpriv.none         /var/log/messages
authpriv.*                             /var/log/secure
mail.*                                 /var/log/maillog
*.emerg                    *
uucp,news.crit             /var/log/spoolerr

文件:/etc/default/busybox-syslog

OPTIONS="-C250"

但是,当我运行 logread 时,它只显示了与 ntpd 日志相关的三个项目。但是,/var/log/messages 包含大量系统日志!请告诉我应该如何配置 logread 以反映 /var/log/messages 中的所有日志?

0 个答案:

没有答案