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

Commit 8e617be8 authored by Chris Manton's avatar Chris Manton
Browse files

Add LOG_DUMPSYS[_TITLE]

Toward loggable code

Bug: 163134718
Tag: #refactor
Test: CtsVerifier

Change-Id: I6f8b8ae83c220324c5f99ce1f06178c13803913d
parent dba5778b
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -19,6 +19,18 @@
#include <functional>
#include <list>

#define LOG_DUMPSYS(fd, fmt, args...)                 \
  do {                                                \
    dprintf(fd, "%s " fmt "\n", DUMPSYS_TAG, ##args); \
  } while (false)

#define LOG_DUMPSYS_TITLE(fd, title)         \
  do {                                       \
    dprintf(fd, " ----- %s -----\n", title); \
  } while (false)

#define BOOL_TEXT(b) ((b) ? "true" : "false")

namespace bluetooth {
namespace shim {