tree-wise: several cleanups for logging

- drop unnecessary SYNTHETIC_ERRNO() when the logger does not propagate
  error code,
- drop unnecessary '%m' in error message when the error code is
  specified with SYNTHETIC_ERRNO(),
- add missing full stop at the end of log message,
- use RET_GATHER(),
- add missing ", ignoring.",
- upeercase the first letter, etc., etc...
This commit is contained in:
Yu Watanabe
2024-05-01 04:41:06 +09:00
parent ba2caa8a38
commit 4e494e6aac
43 changed files with 167 additions and 185 deletions
+2 -4
View File
@@ -1073,9 +1073,7 @@ static int get_gateway_description(
}
if (type != RTM_NEWNEIGH) {
log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Got unexpected netlink message type %u, ignoring",
type);
log_error("Got unexpected netlink message type %u, ignoring.", type);
continue;
}
@@ -1086,7 +1084,7 @@ static int get_gateway_description(
}
if (fam != family) {
log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Got invalid rtnl family %d, ignoring", fam);
log_error("Got invalid rtnl family %d, ignoring.", fam);
continue;
}