+
+/**
+ * Logging API for C
+ * This API print out messages to the system log buffer
+ */
+#define INTERNAL_SECURE_LOG __extension__ SECURE_SLOG
+#ifdef DPL_LOGS_ENABLED
+#define WRT_LOG_(priority, ...) \
+do { \
+ INTERNAL_SECURE_LOG(priority, LOG_TAG, __VA_ARGS__); \
+} while(0)
+#else
+#define WRT_LOG_(priority, ...) do { } while (0)
+#endif
+
+#define WrtLogD(...) WRT_LOG_(LOG_DEBUG, __VA_ARGS__)
+#define WrtLogI(...) WRT_LOG_(LOG_INFO, __VA_ARGS__)
+#define WrtLogW(...) WRT_LOG_(LOG_WARN, __VA_ARGS__)
+#define WrtLogE(...) WRT_LOG_(LOG_ERROR, __VA_ARGS__)
+
+
+/**
+ * Logging API for C
+ * This API print out messages to the system log buffer
+ */
+#ifndef SECURE_SLOGD
+#define SECURE_SLOGD(fmt, arg...) SLOGD(fmt,##arg)
+#endif
+
+#ifndef SECURE_SLOGW
+#define SECURE_SLOGW(fmt, arg...) SLOGW(fmt,##arg)
+#endif
+
+#ifndef SECURE_SLOGE
+#define SECURE_SLOGE(fmt, arg...) SLOGE(fmt,##arg)
+#endif
+
+#undef _D
+#undef _W
+#undef _E
+
+#ifdef DPL_LOGS_ENABLED
+#define _D(fmt, arg ...) SECURE_SLOGD(fmt, ##arg)
+#define _W(fmt, arg ...) SECURE_SLOGW(fmt, ##arg)
+#define _E(fmt, arg ...) SECURE_SLOGE(fmt, ##arg)
+#else
+#define _D(fmt, arg ...) do { } while (0)
+#define _W(fmt, arg ...) do { } while (0)
+#define _E(fmt, arg ...) do { } while (0)
+#endif
+