summaryrefslogtreecommitdiff
path: root/lldb/source/Host/common/Host.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Host/common/Host.cpp')
-rw-r--r--lldb/source/Host/common/Host.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index 8e210c7e5fa5..5fbb655fc793 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -293,10 +293,21 @@ void Host::SystemLog(SystemLogType type, const char *format, va_list args) {
#endif
void Host::SystemLog(SystemLogType type, const char *format, ...) {
- va_list args;
- va_start(args, format);
- SystemLog(type, format, args);
- va_end(args);
+ {
+ va_list args;
+ va_start(args, format);
+ SystemLog(type, format, args);
+ va_end(args);
+ }
+
+ Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST));
+ if (log && log->GetVerbose()) {
+ // Log to log channel. This allows testcases to grep for log output.
+ va_list args;
+ va_start(args, format);
+ log->VAPrintf(format, args);
+ va_end(args);
+ }
}
lldb::pid_t Host::GetCurrentProcessID() { return ::getpid(); }