xC: use liberty logging less

These messages cannot be relayed to frontends (they could be,
but it's useful to keep them distinct rather than redirected).
This commit is contained in:
Přemysl Eric Janouch 2022-09-07 03:41:28 +02:00
parent 80089a4d65
commit 41878a587f
Signed by: p
GPG Key ID: A0420B94F92B9493

11
xC.c
View File

@ -2868,6 +2868,7 @@ relay_try_fetch_client (struct app_context *ctx, int listen_fd)
if (accept_error_is_transient (errno))
print_warning ("%s: %s", "accept", strerror (errno));
else
// TODO: Rather dispose of the listening socket.
print_fatal ("%s: %s", "accept", strerror (errno));
return true;
}
@ -14760,7 +14761,8 @@ try_reap_child (struct app_context *ctx)
if (WIFSTOPPED (status))
{
// We could also send SIGCONT but what's the point
print_debug ("a child has been stopped, killing its process group");
log_global_debug (ctx,
"A child has been stopped, killing its process group");
kill (-zombie, SIGKILL);
return true;
}
@ -15258,7 +15260,7 @@ client_process_message (struct client *c,
if (!relay_command_message_deserialize (m, r)
|| msg_unpacker_get_available (r))
{
print_error ("deserialization failed, killing client");
log_global_error (c->ctx, "Deserialization failed, killing client");
return false;
}
@ -15277,7 +15279,8 @@ client_process_message (struct client *c,
if (m->data.hello.version != RELAY_VERSION)
{
// TODO: This should send back an error message and shut down.
print_error ("protocol version mismatch, killing client");
log_global_error (c->ctx,
"Protocol version mismatch, killing client");
return false;
}
c->initialized = true;
@ -15305,7 +15308,7 @@ client_process_message (struct client *c,
client_process_buffer_log (c, m->command_seq, buffer);
break;
default:
print_warning ("unhandled client command");
log_global_debug (c->ctx, "Unhandled client command");
relay_prepare_error (c->ctx, m->command_seq, "Unknown command");
relay_send (c);
}