Skip to content

Commit 3d79006

Browse files
committedMar 15, 2019
Simplify error logging
Signed-off-by: Arnaud Quette <ArnaudQuette@eaton.com>
1 parent f88b087 commit 3d79006

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎server/conf.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static int parse_upsd_conf_args(int numargs, char **arg)
128128
maxage = temp;
129129
return 1;
130130
}
131-
upslogx(LOG_ERR, "Could not convert MAXAGE (%s) to an unsigned int (%s)!", arg[1], strerror(errno));
131+
upslogx(LOG_ERR, "Could not convert %s (%s) to an unsigned int (%s)!", arg[0], arg[1], strerror(errno));
132132
return 0;
133133
}
134134

@@ -138,7 +138,7 @@ static int parse_upsd_conf_args(int numargs, char **arg)
138138
tracking_delay = temp;
139139
return 1;
140140
}
141-
upslogx(LOG_ERR, "Could not convert TRACKINGDELAY (%s) to an unsigned int (%s)!", arg[1], strerror(errno));
141+
upslogx(LOG_ERR, "Could not convert %s (%s) to an unsigned int (%s)!", arg[0], arg[1], strerror(errno));
142142
return 0;
143143
}
144144

@@ -148,7 +148,7 @@ static int parse_upsd_conf_args(int numargs, char **arg)
148148
maxconn = temp;
149149
return 1;
150150
}
151-
upslogx(LOG_ERR, "Could not convert MAXCONN (%s) to an unsigned int (%s)!", arg[1], strerror(errno));
151+
upslogx(LOG_ERR, "Could not convert %s (%s) to an unsigned int (%s)!", arg[0], arg[1], strerror(errno));
152152
return 0;
153153
}
154154

@@ -187,7 +187,7 @@ static int parse_upsd_conf_args(int numargs, char **arg)
187187
certrequest = temp;
188188
return 1;
189189
}
190-
upslogx(LOG_ERR, "Could not convert CERTREQUEST (%s) to an unsigned int (%s)!", arg[1], strerror(errno));
190+
upslogx(LOG_ERR, "Could not convert %s (%s) to an unsigned int (%s)!", arg[0], arg[1], strerror(errno));
191191
return 0;
192192
}
193193
#endif /* WITH_CLIENT_CERTIFICATE_VALIDATION */

0 commit comments

Comments
 (0)
Please sign in to comment.