Better logging system

Use C++ magic to strip out debug logs at compile time
This commit is contained in:
topjohnwu
2020-06-01 04:15:37 -07:00
parent ad94f10205
commit 2f824f59dc
16 changed files with 118 additions and 138 deletions

View File

@@ -7,15 +7,10 @@
#include <selinux.hpp>
#include <daemon.hpp>
#include <resetprop.hpp>
#include <flags.h>
using namespace std;
#ifdef MAGISK_DEBUG
#define VLOGI(tag, from, to) LOGI("%-8s: %s <- %s\n", tag, to, from)
#else
#define VLOGI(tag, from, to) LOGI("%-8s: %s\n", tag, to)
#endif
#define TYPE_MIRROR (1 << 0) /* mount from mirror */
#define TYPE_INTER (1 << 1) /* intermediate node */