Add the permanent log feature 31/221231/2
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 30 Dec 2019 07:58:35 +0000 (16:58 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 30 Dec 2019 08:00:24 +0000 (17:00 +0900)
Change-Id: I589b1f124d079a52c37fb2530ca6b220d321b6e7
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-service-adaptation/services/bt-service-common.c
packaging/bluetooth-frwk.spec

index 6baf5fa..2aa4800 100644 (file)
@@ -1309,6 +1309,10 @@ void _bt_permanent_log(const char *fmt, ...)
        long lsize = 0;
        va_list ap;
 
+#ifndef TIZEN_FEATURE_BT_PERMANENT_LOG
+       return;
+#endif
+
        t = time(&t);
        lt = localtime(&t);
        strftime(time_buf, sizeof(time_buf), "%m-%d %H:%M:%S", lt);
index 68bde80..a18d3b2 100644 (file)
@@ -19,6 +19,7 @@ Requires: bluetooth-tools
 
 %define bt_bluez_hal ENABLED
 %define bt_gatt_client_fd ENABLED
+%define bt_permanent_log DISABLED
 
 BuildRequires:  pkgconfig(aul)
 BuildRequires:  pkgconfig(dlog)
@@ -261,6 +262,10 @@ export LDFLAGS="$CFLAGS -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--unresolved-
 export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_GATT_CLIENT_FD_DISABLE"
 %endif
 
+%if %{bt_permanent_log} == ENABLED
+export CFLAGS="$CFLAGS -DTIZEN_FEATURE_BT_PERMANENT_LOG"
+%endif
+
 %ifarch %{ix86} x86_64
 export CFLAGS+=" -DTIZEN_TEST_EMUL"
 export CXXFLAGS+=" -DTIZEN_TEST_EMUL"