Search code examples
linuxloggingconsolesyslogrsyslog

syslogd does not understand console.* rule in syslog.conf with error " syslogd: unknown facility name "console"


I am trying to redirect all the messages/logs that are displayed on the console to be redirected to /ver/log/console.log. I tried to do this using syslogd with a rule added in syslog.conf but it is not working.

My syslog.conf file is below,

kern.*                  /var/log/kernel.log
**console.*               /var/log/console.log**
auth,authpriv.*         /var/log/auth.log
*.*;auth,authpriv.none  /var/log/messages
user.*                  /var/log/user.log

when I start the syslog I see below error.

syslogd

 **syslogd: unknown facility name "console"**

Any idea on how to fix this or any alternative to capture the console logs in linux?


Solution

  • This error occurred while using the busybox version of syslogd(&klogd). Once I enabled both klogd and syslogd from build-root it was able to record all the logs successfully. Also using rsyslogd is more convenient way.