Skip to content

[lldb][lldb-dap][NFC] Fix swapped logging directions for DAP messages. #131544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

da-viper
Copy link
Contributor

The logging markers for incoming ("<--") and outgoing ("-->") messages were incorrectly reversed. from #7790d69

The logging markers for incoming ("<--") and outgoing ("-->")
messages were incorrectly reversed. from #7790d69
@llvmbot
Copy link
Member

llvmbot commented Mar 16, 2025

@llvm/pr-subscribers-lldb

Author: Ebuka Ezike (da-viper)

Changes

The logging markers for incoming ("<--") and outgoing ("-->") messages were incorrectly reversed. from #7790d69


Full diff: https://github.com/llvm/llvm-project/pull/131544.diff

1 Files Affected:

  • (modified) lldb/tools/lldb-dap/Transport.cpp (+2-2)
diff --git a/lldb/tools/lldb-dap/Transport.cpp b/lldb/tools/lldb-dap/Transport.cpp
index db2d7228d3fb7..a721662a345eb 100644
--- a/lldb/tools/lldb-dap/Transport.cpp
+++ b/lldb/tools/lldb-dap/Transport.cpp
@@ -103,7 +103,7 @@ Expected<std::optional<Message>> Transport::Read() {
   if (raw_json->length() != length)
     return createStringError("unexpected EOF parse DAP message body");
 
-  DAP_LOG(m_log, "<-- ({0}) {1}", m_client_name, *raw_json);
+  DAP_LOG(m_log, "--> ({0}) {1}", m_client_name, *raw_json);
 
   return json::parse<Message>(*raw_json);
 }
@@ -114,7 +114,7 @@ Error Transport::Write(const Message &message) {
 
   std::string json = formatv("{0}", toJSON(message)).str();
 
-  DAP_LOG(m_log, "--> ({0}) {1}", m_client_name, json);
+  DAP_LOG(m_log, "<-- ({0}) {1}", m_client_name, json);
 
   std::string Output;
   raw_string_ostream OS(Output);

@JDevlieghere
Copy link
Member

Huh, you're right, the direction was changed, but I actually think the current direction is more intuitive.

@ashgti did you change this on purpose?

@JDevlieghere JDevlieghere requested a review from ashgti March 17, 2025 01:32
@ashgti
Copy link
Contributor

ashgti commented Mar 17, 2025

Huh, you're right, the direction was changed, but I actually think the current direction is more intuitive.

@ashgti did you change this on purpose?

I didn’t mean to change it but I’m fine with either form.

@da-viper da-viper merged commit 3af6c9f into llvm:main Mar 17, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants