[Lldb-commits] [lldb] [lldb-dap] Adding logging helpers. (PR #130653)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 11 08:51:16 PDT 2025
================
@@ -239,14 +241,7 @@ void DAP::SendJSON(const llvm::json::Value &json) {
std::lock_guard<std::mutex> locker(mutex);
SendJSON(json_str);
- if (log) {
- auto now = std::chrono::duration<double>(
- std::chrono::system_clock::now().time_since_epoch());
- *log << llvm::formatv("{0:f9} {1} <-- ", now.count(), name).str()
- << std::endl
- << "Content-Length: " << json_str.size() << "\r\n\r\n"
- << llvm::formatv("{0:2}", json).str() << std::endl;
- }
+ DAP_LOG(log, "({0}) <-- {1}", client_name, json_str);
----------------
ashgti wrote:
I updated `ReadJSON` to consistently use `({0})` for the `client_name` like `(stdin/stdout) <-- ...` or `(client_1) <-- ...`
https://github.com/llvm/llvm-project/pull/130653
More information about the lldb-commits
mailing list