From 011101905d91b770893e8a2fb6c09552d1c63652 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 7 May 2014 16:35:59 -0700 Subject: [PATCH] Send bionic's fatal logging to the crash log. Bug: 14159417 Change-Id: I7aa986fb8e11660035221f9bb4fe0bc40ac36c58 --- libc/bionic/libc_logging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/bionic/libc_logging.cpp b/libc/bionic/libc_logging.cpp index f15abbeeb..79472b3a8 100644 --- a/libc/bionic/libc_logging.cpp +++ b/libc/bionic/libc_logging.cpp @@ -495,7 +495,7 @@ static int __libc_write_log(int priority, const char* tag, const char* msg) { } iovec vec[6]; - char log_id = LOG_ID_MAIN; + char log_id = (priority == ANDROID_LOG_FATAL) ? LOG_ID_CRASH : LOG_ID_MAIN; vec[0].iov_base = &log_id; vec[0].iov_len = sizeof(log_id); uint16_t tid = gettid();