1//===-- Transport.cpp -----------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "Transport.h"
10#include "DAPLog.h"
11#include "lldb/lldb-forward.h"
12#include "llvm/ADT/StringRef.h"
13
14using namespace llvm;
15using namespace lldb;
16using namespace lldb_private;
17using namespace lldb_dap;
18
19Transport::Transport(llvm::StringRef client_name, lldb_dap::Log *log,
20 lldb::IOObjectSP input, lldb::IOObjectSP output)
21 : HTTPDelimitedJSONTransport(input, output), m_client_name(client_name),
22 m_log(log) {}
23
24void Transport::Log(llvm::StringRef message) {
25 DAP_LOG(m_log, "({0}) {1}", m_client_name, message);
26}
27

source code of lldb/tools/lldb-dap/Transport.cpp