Date: Fri, 2 Oct 2015 14:21:07 +0000 (UTC) From: Eric van Gyzen <vangyzen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r288497 - in stable/10: share/man/man9 sys/kern Message-ID: <201510021421.t92EL7Gc026499@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510021421.t92EL7Gc026499>