From be265d25ca5e300a3af45a5f85fc6e4b107148e5 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 24 Jun 2022 12:53:10 -0700 Subject: [lldb] Add support for specifying a log handler This patch adds a new flag to `log enable`, allowing the user to specify a custom log handler. In addition to the default (stream) handler, this allows using the circular log handler (which logs to a fixed size, in-memory circular buffer) as well as the system log handler (which logs to the operating system log). Differential revision: https://reviews.llvm.org/D128323 --- lldb/source/API/SBDebugger.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lldb/source/API/SBDebugger.cpp') diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index 8aa2c74..0de934b 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -1621,7 +1621,8 @@ bool SBDebugger::EnableLog(const char *channel, const char **categories) { std::string error; llvm::raw_string_ostream error_stream(error); return m_opaque_sp->EnableLog(channel, GetCategoryArray(categories), "", - log_options, /*buffer_size=*/0, error_stream); + log_options, /*buffer_size=*/0, + eLogHandlerStream, error_stream); } else return false; } -- cgit v1.1