diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2022-09-07 03:41:28 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2022-09-07 13:01:30 +0200 |
commit | 41878a587f3c2ffc55448137d1cc72f835fb8bc5 (patch) | |
tree | fa2ba0ea0f8191debd4ccdf3502d26eb0d25b2a9 | |
parent | 80089a4d65f32ef5be31d895c59515a7e21ce84b (diff) | |
download | xK-41878a587f3c2ffc55448137d1cc72f835fb8bc5.tar.gz xK-41878a587f3c2ffc55448137d1cc72f835fb8bc5.tar.xz xK-41878a587f3c2ffc55448137d1cc72f835fb8bc5.zip |
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).
-rw-r--r-- | xC.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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); } |