diff options
author | June McEnroe <june@causal.agency> | 2021-08-20 16:33:12 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-08-20 16:33:12 -0400 |
commit | 6fc2271398fbbe271f06f9ba1e2997810a1ab776 (patch) | |
tree | b5b07e7b09a4cfd2baee283d44707b918e9ee70e /server.c | |
parent | Explicitly clear TLS secrets after handshake (diff) | |
download | pounce-6fc2271398fbbe271f06f9ba1e2997810a1ab776.tar.gz pounce-6fc2271398fbbe271f06f9ba1e2997810a1ab776.zip |
Replace verbose colors with two types of arrows
While the colors were easy to identify in blocks, the meaning of arrows is easier to remember, and survive logs being pasted for debugging.
Diffstat (limited to '')
-rw-r--r-- | server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server.c b/server.c index d970deb..aa17cde 100644 --- a/server.c +++ b/server.c @@ -163,7 +163,7 @@ void serverPrintCert(void) { } void serverSend(const char *ptr, size_t len) { - if (verbose) fprintf(stderr, "\x1B[31m%.*s\x1B[m", (int)len, ptr); + if (verbose) fprintf(stderr, "<< %.*s", (int)len, ptr); while (len) { ssize_t ret = tls_write(client, ptr, len); if (ret == TLS_WANT_POLLIN || ret == TLS_WANT_POLLOUT) continue; @@ -239,7 +239,7 @@ void serverRecv(void) { crlf = memmem(line, &buf[len] - line, "\r\n", 2); if (!crlf) break; crlf[0] = '\0'; - if (verbose) fprintf(stderr, "\x1B[32m%s\x1B[m\n", line); + if (verbose) fprintf(stderr, ">> %s\n", line); const char *ping = line; if (ping[0] == '@') { ping += strcspn(ping, " "); |