Date: Mon, 20 Apr 2015 20:03:26 +0000 (UTC) From: Eric van Gyzen <vangyzen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281785 - in head: share/man/man9 sys/kern Message-ID: <201504202003.t3KK3QiA098040@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vangyzen Date: Mon Apr 20 20:03:26 2015 New Revision: 281785 URL: https://svnweb.freebsd.org/changeset/base/281785 Log: 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 Modified: head/share/man/man9/printf.9 head/sys/kern/subr_prf.c Modified: head/share/man/man9/printf.9 ============================================================================== --- head/share/man/man9/printf.9 Mon Apr 20 20:03:07 2015 (r281784) +++ head/share/man/man9/printf.9 Mon Apr 20 20:03:26 2015 (r281785) @@ -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: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Mon Apr 20 20:03:07 2015 (r281784) +++ head/sys/kern/subr_prf.c Mon Apr 20 20:03:26 2015 (r281785) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504202003.t3KK3QiA098040>