[PATCH] D44226: [clangd] Add -log-lsp-to-stderr option
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 16 04:54:04 PDT 2018
ilya-biryukov added a comment.
Sorry for the delay, just a few more comments.
================
Comment at: clangd/ClangdLSPServer.cpp:412
+ llvm::raw_string_ostream OS(Message);
+ OS << "method not found (" << Method << ")";
+ replyError(ErrorCode::MethodNotFound, OS.str());
----------------
Could we also `log` (i.e. not `vlog`) names of the methods that were handled successfully? To have some context when something crashes and we only have non-verbose logs.
================
Comment at: clangd/ClangdLSPServer.cpp:413
+ OS << "method not found (" << Method << ")";
+ replyError(ErrorCode::MethodNotFound, OS.str());
});
----------------
Maybe use `llvm::formatv` to generate message? Having a string and a stream for something as simple is too verbose.
================
Comment at: clangd/Logger.cpp:19
Logger *L = nullptr;
+bool Verbose_ = false;
+
----------------
We don't need `Verbose` variable here and `Verbose` flag from `LoggingSession` anymore.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44226
More information about the cfe-commits
mailing list