chromeos-init: improve kernel logging

Some messages were appearing in the kernel ring-buffer (as examined
by dmesg), but not in /var/log/messages. It turns out that rsyslogd
defaults to filtering messages read from /proc/kmsg, so that only
kernel messages are candidates for logging.

This default is bad for us, since init (upstart) logs to the kernel
ring buffer. Resolve the problem, by disabling rsyslogd's filtering
of these messages.

BUG=chromium:383075
TEST=platform_LogNonKernelKmsg
CQ-DEPEND=CL:203319

Change-Id: I73075dcb12e1a37ea93f9bb690c68862849bd9ba
Reviewed-on: https://chromium-review.googlesource.com/203332
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
diff --git a/rsyslog.chromeos b/rsyslog.chromeos
index 8c07c55..3601fa0 100644
--- a/rsyslog.chromeos
+++ b/rsyslog.chromeos
@@ -13,6 +13,9 @@
 $SystemLogRateLimitInterval 0
 $RepeatedMsgReduction on
 
+# Allow messages from upstart, which logs through /dev/klog.
+$KLogPermitNonKernelFacility on
+
 # Keep network stuff in /var/log/net.log; throw away warnings, etc (see RFC 3164).
 if (($programname == 'shill') or ($programname == 'dhcpcd') or ($programname == 'wpa_supplicant') or ($programname == 'cromo') or ($programname == 'ModemManager') or ($programname == 'mist') or ($programname == 'nss-get-cert') or ($programname == 'openvpn') or ($programname == 'openvpn-script') or ($programname == 'l2tpipsec_vpn') or ($programname == 'pppd') or ($programname == 'wimax-manager') or ($programname == 'pseudomodem')) then -/var/log/net.log
 if (($programname == 'shill') or ($programname == 'dhcpcd') or ($programname == 'wpa_supplicant') or ($programname == 'cromo') or ($programname == 'ModemManager') or ($programname == 'mist') or ($programname == 'nss-get-cert') or ($programname == 'openvpn') or ($programname == 'openvpn-script') or ($programname == 'l2tpipsec_vpn') or ($programname == 'pppd') or ($programname == 'wimax-manager') or ($programname == 'pseudomodem')) and $syslogseverity >= '4' then ~