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

Commit 74036e2e authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

Merge "Base: Explicitly set abort message on FATAL" am: 72050f71 am: c5413c2d

am: 2b34b3df

Change-Id: I15606756aae508a749ab02577546aa2147805b26
parents 9004d0bd 2b34b3df
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -417,6 +417,14 @@ LogMessage::~LogMessage() {
  }
  std::string msg(data_->ToString());

  if (data_->GetSeverity() == FATAL) {
#ifdef __ANDROID__
    // Set the bionic abort message early to avoid liblog doing it
    // with the individual lines, so that we get the whole message.
    android_set_abort_message(msg.c_str());
#endif
  }

  {
    // Do the actual logging with the lock held.
    std::lock_guard<std::mutex> lock(LoggingLock());