File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1512,7 +1512,22 @@ void Debugger::ReportDiagnosticImpl(DiagnosticEventData::Type type,
1512
1512
std::string message,
1513
1513
std::optional<lldb::user_id_t > debugger_id,
1514
1514
std::once_flag *once) {
1515
+ auto GetSystemLogLevel = [](DiagnosticEventData::Type type) {
1516
+ switch (type) {
1517
+ case DiagnosticEventData::Type::Info:
1518
+ return Host::eSystemLogInfo;
1519
+ case DiagnosticEventData::Type::Warning:
1520
+ return Host::eSystemLogWarning;
1521
+ case DiagnosticEventData::Type::Error:
1522
+ return Host::eSystemLogError;
1523
+ }
1524
+ llvm_unreachable (" All cases handled above!" );
1525
+ };
1526
+
1515
1527
auto ReportDiagnosticLambda = [&]() {
1528
+ // Always log diagnostics to the system log.
1529
+ Host::SystemLog (GetSystemLogLevel (type), message);
1530
+
1516
1531
// The diagnostic subsystem is optional but we still want to broadcast
1517
1532
// events when it's disabled.
1518
1533
if (Diagnostics::Enabled ())
You can’t perform that action at this time.
0 commit comments