Remove lldb streams from the Log class completely
Summary:
previously we switched to llvm streams for log output, this completes
the switch for the error streams.
I also clean up the includes and remove the unused argument from
DisableAllLogChannels().
This required adding a bit of boiler plate to convert the output in the
command interpreter, but that should go away when we switch command
results to use llvm streams as well.
Reviewers: zturner, eugene
Subscribers: lldb-commits, emaste
Differential Revision: https://reviews.llvm.org/D30894
llvm-svn: 297812
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 8af2bad..9ac65a6 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -1242,7 +1242,7 @@
bool Debugger::EnableLog(llvm::StringRef channel,
llvm::ArrayRef<const char *> categories,
llvm::StringRef log_file, uint32_t log_options,
- Stream &error_stream) {
+ llvm::raw_ostream &error_stream) {
const bool should_close = true;
const bool unbuffered = true;
@@ -1266,7 +1266,7 @@
int FD;
if (std::error_code ec =
llvm::sys::fs::openFileForWrite(log_file, FD, flags)) {
- error_stream.Format("Unable to open log file: {0}", ec.message());
+ error_stream << "Unable to open log file: " << ec.message();
return false;
}
log_stream_sp.reset(