Subject: RE: Getting rid of messages to console
To: Grant Stockly <email@example.com>
From: Mike Pelley <firstname.lastname@example.org>
Date: 12/06/1999 18:03:44
> I tried changing the entry in syslog.conf from
> /dev/console to /var/log/consolelog (I created
> a file for it) and it still outputs messages
> to the console.
Along with the syslog /dev/console stuff, the kernel also prints stuff to
the console. The kernel's printf routine prints messages to both
/var/log/messages (through syslog) and to the screen.
There are many things the kernel prints that one might really like to know,
but if you are certain you don't want to see these things, you can edit
/usr/src/sys/kern/subr_prf.c and change any calls to kprintf to not include
the TOCONS, for example:
change "kprintf(fmt, TOCONS | TOLOG, NULL, NULL, ap);" to "kprintf(fmt,
TOLOG, NULL, NULL, ap);".
and recompile your kernel. It's very hack-ish but it's the only way I know
to keep the kernel from printing to the console.