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

Commit 19697f3e authored by Mark Salyzyn's avatar Mark Salyzyn Committed by Android Git Automerger
Browse files

am 3ad0af6d: Merge "logd: liblog: logcat: debuggerd: Add LOG_ID_CRASH"

* commit '3ad0af6d':
  logd: liblog: logcat: debuggerd: Add LOG_ID_CRASH
parents fe545b9c 3ad0af6d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <sys/wait.h>

#include <backtrace/Backtrace.h>
#include <log/log.h>
#include <log/logd.h>

const int sleep_time_usec = 50000;         // 0.05 seconds
@@ -64,7 +65,7 @@ void _LOG(log_t* log, int scopeFlags, const char* fmt, ...) {
  }

  if (want_log_write) {
    __android_log_write(ANDROID_LOG_INFO, "DEBUG", buf);
    __android_log_buf_write(LOG_ID_CRASH, ANDROID_LOG_INFO, "DEBUG", buf);
    if (want_amfd_write) {
      int written = write_to_am(log->amfd, buf, len);
      if (written <= 0) {
+1 −0
Original line number Diff line number Diff line
@@ -550,6 +550,7 @@ typedef enum log_id {
    LOG_ID_RADIO = 1,
    LOG_ID_EVENTS = 2,
    LOG_ID_SYSTEM = 3,
    LOG_ID_CRASH = 4,

    LOG_ID_MAX
} log_id_t;
+2 −1
Original line number Diff line number Diff line
@@ -196,7 +196,8 @@ static const char *LOG_NAME[LOG_ID_MAX] = {
    [LOG_ID_MAIN] = "main",
    [LOG_ID_RADIO] = "radio",
    [LOG_ID_EVENTS] = "events",
    [LOG_ID_SYSTEM] = "system"
    [LOG_ID_SYSTEM] = "system",
    [LOG_ID_CRASH] = "crash",
};

const char *android_log_id_to_name(log_id_t log_id)
+2 −1
Original line number Diff line number Diff line
@@ -58,7 +58,8 @@ static const char *LOG_NAME[LOG_ID_MAX] = {
    [LOG_ID_MAIN] = "main",
    [LOG_ID_RADIO] = "radio",
    [LOG_ID_EVENTS] = "events",
    [LOG_ID_SYSTEM] = "system"
    [LOG_ID_SYSTEM] = "system",
    [LOG_ID_CRASH] = "crash"
};

const char *android_log_id_to_name(log_id_t log_id)
+3 −2
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ static pthread_mutex_t log_init_lock = PTHREAD_MUTEX_INITIALIZER;
static int logd_fd = -1;
#if FAKE_LOG_DEVICE
#define WEAK __attribute__((weak))
static int log_fds[(int)LOG_ID_MAX] = { -1, -1, -1, -1 };
static int log_fds[(int)LOG_ID_MAX] = { -1, -1, -1, -1, -1 };
#endif

/*
@@ -243,7 +243,8 @@ static const char *LOG_NAME[LOG_ID_MAX] = {
    [LOG_ID_MAIN] = "main",
    [LOG_ID_RADIO] = "radio",
    [LOG_ID_EVENTS] = "events",
    [LOG_ID_SYSTEM] = "system"
    [LOG_ID_SYSTEM] = "system",
    [LOG_ID_CRASH] = "crash"
};

const WEAK char *android_log_id_to_name(log_id_t log_id)
Loading