Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2401d64 authored by Henri Chataing's avatar Henri Chataing
Browse files

system/log: [FLOSS] Call std::abort on fatal log messages

Test: m com.android.btservices
Bug: 305066880
Flag: EXEMPT, log change
Change-Id: I53c459bb350607d210aaf2b3e9e0183299ba574f
parent de95de35
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -90,6 +90,12 @@ void vlog(Level level, char const* tag, source_location location,

  // Print to vsyslog.
  syslog(LOG_USER | severity, "%s", buffer.c_str());

  // abort if the message was fatal.
  // syslog does not independently abort on CRIT logs.
  if (level == Level::kFatal) {
    std::abort();
  }
}

}  // namespace bluetooth::log_internal