File: 08-fix-loglevels.patch

package info (click to toggle)
apcupsd 3.14.14-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,904 kB
  • sloc: ansic: 24,826; cpp: 9,230; sh: 4,484; makefile: 1,200; tcl: 368; objc: 317; php: 107
file content (27 lines) | stat: -rw-r--r-- 1,268 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: redefine loglevels
Index: apcupsd-3.14.12/src/action.c
===================================================================
--- apcupsd-3.14.12.orig/src/action.c
+++ apcupsd-3.14.12/src/action.c
@@ -61,17 +61,17 @@ UPSCOMMANDS ups_event[] = {
  * and the defines in include/apc_defines.h 
  */
 UPSCMDMSG event_msg[] = {
-   {LOG_CRIT,    "Power failure."},
+   {LOG_ALERT,   "Power failure."},
    {LOG_CRIT,    "Running on UPS batteries."},
    {LOG_ALERT,   "Battery power exhausted."},
    {LOG_ALERT,   "Reached run time limit on batteries."},
    {LOG_ALERT,   "Battery charge below low limit."},
    {LOG_ALERT,   "Reached remaining time percentage limit on batteries."},
    {LOG_ALERT,   "Initiating system shutdown!"},
-   {LOG_ALERT,   "Power is back. UPS running on mains."},
-   {LOG_ALERT,   "Users requested to logoff."},
+   {LOG_CRIT,    "Power is back. UPS running on mains."},
+   {LOG_CRIT,    "Users requested to logoff."},
    {LOG_ALERT,   "Battery failure. Emergency."},
-   {LOG_CRIT,    "UPS battery must be replaced."},
+   {LOG_ALERT,   "UPS battery must be replaced."},
    {LOG_CRIT,    "Remote shutdown requested."},
    {LOG_WARNING, "Communications with UPS lost."},
    {LOG_WARNING, "Communications with UPS restored."},