Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Oct 2017 12:38:26 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324312 - head/etc/devd
Message-ID:  <201710051238.v95CcQBd044605@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Thu Oct  5 12:38:26 2017
New Revision: 324312
URL: https://svnweb.freebsd.org/changeset/base/324312

Log:
  fix the misleading log facility used in devd/zfs.conf
  
  In general, the "kern" facility is reserved for the kernel use only.
  If a program specifies that facility, then it is silently converted
  to "user" facility.
  So, using logger -p kern.xxx was both misleading and non-specific.
  
  Thus, change the facility to local7, so that users can create
  more adequate syslogd configurations.
  
  While local0..local7 are documented as being for local use we already
  have several examples in the tree where they are used because none of
  the named facilities really fits.
  
  Approved by:	asomers
  MFC after:	2 weeks
  Differential Revision: https://reviews.freebsd.org/D12420

Modified:
  head/etc/devd/zfs.conf

Modified: head/etc/devd/zfs.conf
==============================================================================
--- head/etc/devd/zfs.conf	Thu Oct  5 12:32:14 2017	(r324311)
+++ head/etc/devd/zfs.conf	Thu Oct  5 12:38:26 2017	(r324312)
@@ -5,73 +5,73 @@
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"fs.zfs.checksum";
-	action "logger -p kern.warn -t ZFS 'checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'";
+	action "logger -p local7.warn -t ZFS 'checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'";
 };
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"fs.zfs.io";
-	action "logger -p kern.warn -t ZFS 'vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'";
+	action "logger -p local7.warn -t ZFS 'vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'";
 };
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"fs.zfs.data";
-	action "logger -p kern.warn -t ZFS 'pool I/O failure, zpool=$pool error=$zio_err'";
+	action "logger -p local7.warn -t ZFS 'pool I/O failure, zpool=$pool error=$zio_err'";
 };
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"fs.zfs.zpool";
-	action "logger -p kern.err -t ZFS 'failed to load zpool $pool'";
+	action "logger -p local7.err -t ZFS 'failed to load zpool $pool'";
 };
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"fs.zfs.vdev\..*";
-	action "logger -p kern.err -t ZFS 'vdev problem, zpool=$pool path=$vdev_path type=$type'";
+	action "logger -p local7.err -t ZFS 'vdev problem, zpool=$pool path=$vdev_path type=$type'";
 };
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"fs.zfs.io_failure";
-	action "logger -p kern.alert -t ZFS 'catastrophic pool I/O failure, zpool=$pool'";
+	action "logger -p local7.alert -t ZFS 'catastrophic pool I/O failure, zpool=$pool'";
 };
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"fs.zfs.probe_failure";
-	action "logger -p kern.err -t ZFS 'vdev probe failure, zpool=$pool path=$vdev_path'";
+	action "logger -p local7.err -t ZFS 'vdev probe failure, zpool=$pool path=$vdev_path'";
 };
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"fs.zfs.log_replay";
-	action "logger -p kern.err -t ZFS 'pool log replay failure, zpool=$pool'";
+	action "logger -p local7.err -t ZFS 'pool log replay failure, zpool=$pool'";
 };
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"fs.zfs.config_cache_write";
-	action "logger -p kern.warn -t ZFS 'failed to write zpool.cache, zpool=$pool'";
+	action "logger -p local7.warn -t ZFS 'failed to write zpool.cache, zpool=$pool'";
 };
 
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"resource.fs.zfs.removed";
-	action "logger -p kern.notice -t ZFS 'vdev is removed, pool_guid=$pool_guid vdev_guid=$vdev_guid'";
+	action "logger -p local7.notice -t ZFS 'vdev is removed, pool_guid=$pool_guid vdev_guid=$vdev_guid'";
 };
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"resource.fs.zfs.autoreplace";
-	action "logger -p kern.info -t ZFS 'autoreplace is configured for vdev, pool_guid=$pool_guid vdev_guid=$vdev_guid'";
+	action "logger -p local7.info -t ZFS 'autoreplace is configured for vdev, pool_guid=$pool_guid vdev_guid=$vdev_guid'";
 };
 
 notify 10 {
 	match "system"		"ZFS";
 	match "type"		"resource.fs.zfs.statechange";
-	action "logger -p kern.notice -t ZFS 'vdev state changed, pool_guid=$pool_guid vdev_guid=$vdev_guid'";
+	action "logger -p local7.notice -t ZFS 'vdev state changed, pool_guid=$pool_guid vdev_guid=$vdev_guid'";
 };
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710051238.v95CcQBd044605>