svn commit: r288497 - in stable/10: share/man/man9 sys/kern
Eric van Gyzen
vangyzen at FreeBSD.org
Fri Oct 2 14:21:08 UTC 2015
Author: vangyzen
Date: Fri Oct 2 14:21:07 2015
New Revision: 288497
URL: https://svnweb.freebsd.org/changeset/base/288497
Log:
MFC r281785
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 at badgerio.us>
Obtained from: Dell Inc.
Modified:
stable/10/share/man/man9/printf.9
stable/10/sys/kern/subr_prf.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/share/man/man9/printf.9
==============================================================================
--- stable/10/share/man/man9/printf.9 Fri Oct 2 14:16:37 2015 (r288496)
+++ stable/10/share/man/man9/printf.9 Fri Oct 2 14:21:07 2015 (r288497)
@@ -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
Modified: stable/10/sys/kern/subr_prf.c
==============================================================================
--- stable/10/sys/kern/subr_prf.c Fri Oct 2 14:16:37 2015 (r288496)
+++ stable/10/sys/kern/subr_prf.c Fri Oct 2 14:21:07 2015 (r288497)
@@ -305,7 +305,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;
More information about the svn-src-stable-10
mailing list