mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-28 13:08:38 +00:00
tap-vsockd: use stderr rather than syslog if service guid is wrong
Our convention is to print command-line parse failures to the terminal to allow easier interactive debugging, rather than sending them to the syslog. Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
parent
1805c803a9
commit
1e96379e3f
@ -387,19 +387,19 @@ int main(int argc, char **argv)
|
||||
fprintf(stderr, "For daemon mode, please supply a --pidfile argument.\n");
|
||||
exit(1);
|
||||
}
|
||||
res = parseguid(serviceid, &sid);
|
||||
if (res) {
|
||||
fprintf(stderr, "Failed to parse serviceid as GUID: %s\n", serviceid);
|
||||
usage(argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int log_flags = LOG_CONS | LOG_NDELAY;
|
||||
if (!daemon_flag) {
|
||||
log_flags |= LOG_PERROR;
|
||||
}
|
||||
openlog(argv[0], log_flags, LOG_DAEMON);
|
||||
|
||||
res = parseguid(serviceid, &sid);
|
||||
if (res) {
|
||||
syslog(LOG_CRIT, "Failed to parse serviceid as GUID: %s", serviceid);
|
||||
usage(argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int sock = -1;
|
||||
if (listen_flag) {
|
||||
syslog(LOG_INFO, "starting in listening mode with serviceid=%s and tap=%s", serviceid, tap);
|
||||
|
Loading…
Reference in New Issue
Block a user