================ @@ -0,0 +1,30 @@ +//===-- DAPLog.cpp --------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "DAPLog.h" + +using namespace lldb_private; +using namespace lldb_dap; + +static constexpr Log::Category g_categories[] = { + {{"transport"}, {"log DAP transport"}, DAPLog::Transport}, + {{"protocol"}, {"log protocol handling"}, DAPLog::Protocol}, + {{"connection"}, {"log connection handling"}, DAPLog::Connection}, +}; + +static Log::Channel g_log_channel(g_categories, DAPLog::Transport | + DAPLog::Protocol | + DAPLog::Connection); + +template <> Log::Channel &lldb_private::LogChannelFor<DAPLog>() { + return g_log_channel; +} + +void lldb_dap::InitializeDAPChannel() { + Log::Register("lldb-dap", g_log_channel); ---------------- ashgti wrote:
I think given this issue and some other issues related to using the LLDBLog API I think I may not go forward with this patch and revisit at a later date. I think lldb-dap could use some improvements to logging, instead of just passing a `std::ofstream *` around, but I am not sure this is the best approach, also see https://github.com/llvm/llvm-project/pull/129294#issuecomment-2699922582 https://github.com/llvm/llvm-project/pull/129294 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits