diff options
Diffstat (limited to 'lsp-write.c')
-rw-r--r-- | lsp-write.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lsp-write.c b/lsp-write.c index 0eed987..974a845 100644 --- a/lsp-write.c +++ b/lsp-write.c @@ -332,8 +332,12 @@ static void message_writer_write_and_free(LSP *lsp, JSONWriter *o) { memcpy(content, header_str, header_size); #if LSP_SHOW_C2S - printf("%s%s%s\n",term_bold(stdout),content,term_clear(stdout)); + const int limit = 1000; + debug_println("%s%.*s%s%s",term_italics(stdout),limit,content, + strlen(content) > (size_t)limit ? "..." : "", + term_clear(stdout)); #endif + if (lsp->log) { fprintf(lsp->log, "LSP MESSAGE FROM CLIENT TO SERVER\n%s\n\n", content + header_size); } |