Always send log(9) messages to the message buffer.

It is truer to the semantics of logging for messages to *always*
go to the message buffer, where they can eventually be collected
and, in fact, be put into a log file.

This restores the behavior prior to r70239, which seems to have
changed it inadvertently.

Submitted by:	Eric Badger <eric@badgerio.us>
Reviewed by:	jhb
Approved by:	kib (mentor)
Obtained from:	Dell Inc.
MFC after:	1 week
This commit is contained in:
Eric van Gyzen 2015-04-20 20:03:26 +00:00
parent 4b8175ee8f
commit c207ff9319
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281785
2 changed files with 3 additions and 2 deletions

View File

@ -67,7 +67,8 @@ The
.Fn log
function sends the message to the kernel logging facility, using
the log level as indicated by
.Fa pri .
.Fa pri ,
and to the console if no process is yet reading the log.
.Pp
Each of these related functions use the
.Fa fmt

View File

@ -295,7 +295,7 @@ log(int level, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
(void)_vprintf(level, log_open ? TOLOG : TOCONS, fmt, ap);
(void)_vprintf(level, log_open ? TOLOG : TOCONS | TOLOG, fmt, ap);
va_end(ap);
msgbuftrigger = 1;