diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2022-06-24 12:53:10 -0700 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2022-06-24 18:24:00 -0700 |
commit | be265d25ca5e300a3af45a5f85fc6e4b107148e5 (patch) | |
tree | c8205472b1a3a4ef4ea6f41601322adb499b08ee /lldb/source/API/SBDebugger.cpp | |
parent | 7ae92a69c2f3ddd3d41cbc5c808d240184b394d0 (diff) | |
download | llvm-be265d25ca5e300a3af45a5f85fc6e4b107148e5.zip llvm-be265d25ca5e300a3af45a5f85fc6e4b107148e5.tar.gz llvm-be265d25ca5e300a3af45a5f85fc6e4b107148e5.tar.bz2 |
[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
Diffstat (limited to 'lldb/source/API/SBDebugger.cpp')
-rw-r--r-- | lldb/source/API/SBDebugger.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |