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 <e...@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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to