Skip to content

Commit 2a33626

Browse files
committed
Relax log erros. Continue with default values
1 parent 9ba7eb0 commit 2a33626

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/netlog/netlog-conf.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ int config_parse_netlog_remote_address(const char *unit,
2626

2727
r = socket_address_parse(&m->address, rvalue);
2828
if (r < 0) {
29-
log_syntax(unit, LOG_ERR, filename, line, -r,
30-
"Failed to parse address value, ignoring: %s", rvalue);
29+
log_syntax(unit, LOG_WARNING, filename, line, -r, "Failed to parse '%s=%s', ignoring.", lvalue, rvalue);
3130
return 0;
3231
}
3332

@@ -54,9 +53,8 @@ int config_parse_protocol(const char *unit,
5453

5554
r = protocol_from_string(rvalue);
5655
if (r < 0) {
57-
log_syntax(unit, LOG_ERR, filename, line, -r,
58-
"Unrecognised Protocol '%s'", rvalue);
59-
return -EPROTONOSUPPORT;
56+
log_syntax(unit, LOG_WARNING, filename, line, -r, "Failed to parse '%s=%s', ignoring.", lvalue, rvalue);
57+
return 0;
6058
}
6159

6260
m->protocol = r;
@@ -83,9 +81,8 @@ int config_parse_log_format(const char *unit,
8381

8482
r = log_format_from_string(rvalue);
8583
if (r < 0) {
86-
log_syntax(unit, LOG_ERR, filename, line, -r,
87-
"Unrecognised log format '%s'", rvalue);
88-
return -EPROTONOSUPPORT;
84+
log_syntax(unit, LOG_WARNING, filename, line, -r, "Failed to parse '%s=%s', ignoring.", lvalue, rvalue);
85+
return 0;
8986
}
9087

9188
m->log_format = r;

0 commit comments

Comments
 (0)