summaryrefslogtreecommitdiff
path: root/usr.sbin/sensorsd
diff options
context:
space:
mode:
authorConstantine A. Murenin <cnst@cvs.openbsd.org>2007-12-05 17:28:07 +0000
committerConstantine A. Murenin <cnst@cvs.openbsd.org>2007-12-05 17:28:07 +0000
commit52e7566f48bd54f2a0a319139b4ca8625857a49c (patch)
tree4fbbac32936b238becd74ef075851a2802bb2393 /usr.sbin/sensorsd
parent0183f0a42efa0a9d818546c32ee90c878c24fb01 (diff)
log positive events ('OK', 'within') with LOG_INFO instead of LOG_ALERT;
partly spotted by bluhm@ grunk@; ok grunk@
Diffstat (limited to 'usr.sbin/sensorsd')
-rw-r--r--usr.sbin/sensorsd/sensorsd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/sensorsd/sensorsd.c b/usr.sbin/sensorsd/sensorsd.c
index 995a8639321..e15666c53b1 100644
--- a/usr.sbin/sensorsd/sensorsd.c
+++ b/usr.sbin/sensorsd/sensorsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensorsd.c,v 1.35 2007/11/28 17:03:59 tedu Exp $ */
+/* $OpenBSD: sensorsd.c,v 1.36 2007/12/05 17:28:06 cnst Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -366,7 +366,8 @@ report_sdlim(struct sdlim_t *sdlim, time_t last_report)
as = ", UNKNOWN";
break;
}
- syslog(LOG_ALERT, "%s.%s%d: %s%s",
+ syslog(limit->astatus == SENSOR_S_OK ? LOG_INFO :
+ LOG_ALERT, "%s.%s%d: %s%s",
sdlim->dxname, sensor_type_s[limit->type],
limit->numt,
print_sensor(limit->type, limit->last_val), as);
@@ -392,7 +393,8 @@ report_sdlim(struct sdlim_t *sdlim, time_t last_report)
print_sensor(limit->type, limit->last_val));
break;
}
- syslog(LOG_ALERT, "%s.%s%d: %s",
+ syslog(limit->ustatus == SENSORSD_S_WITHIN ? LOG_INFO :
+ LOG_ALERT, "%s.%s%d: %s",
sdlim->dxname, sensor_type_s[limit->type],
limit->numt, us);
}