Add the "LOG_CONSOLE" facility and tell syslogd to not log it on

console devices.
This commit is contained in:
Poul-Henning Kamp 2000-11-25 21:00:58 +00:00
parent 5d4e386e64
commit ea250e5b03
2 changed files with 4 additions and 0 deletions

View File

@ -107,6 +107,7 @@ CODE prioritynames[] = {
#define LOG_FTP (11<<3) /* ftp daemon */
#define LOG_NTP (12<<3) /* NTP subsystem */
#define LOG_SECURITY (13<<3) /* security subsystems (firewalling, etc.) */
#define LOG_CONSOLE (14<<3) /* /dev/console output */
/* other codes through 15 reserved for system use */
#define LOG_LOCAL0 (16<<3) /* reserved for local use */
@ -127,6 +128,7 @@ CODE prioritynames[] = {
CODE facilitynames[] = {
{ "auth", LOG_AUTH, },
{ "authpriv", LOG_AUTHPRIV, },
{ "console", LOG_CONSOLE, },
{ "cron", LOG_CRON, },
{ "daemon", LOG_DAEMON, },
{ "ftp", LOG_FTP, },

View File

@ -667,6 +667,8 @@ printsys(p)
pri = 10 * pri + (*p - '0');
if (*p == '>')
++p;
if (LOG_FAC(pri) == LOG_CONSOLE)
flags |= IGN_CONS;
} else {
/* kernel printf's come out on console */
flags |= IGN_CONS;