From: DoHyun Pyun Date: Mon, 30 Dec 2019 07:58:35 +0000 (+0900) Subject: Add the permanent log feature X-Git-Tag: accepted/tizen/unified/20200129.022658~12 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git;a=commitdiff_plain;h=d6c2bf421b0631f7d449f46d361c51c8b21345f8 Add the permanent log feature Change-Id: I589b1f124d079a52c37fb2530ca6b220d321b6e7 Signed-off-by: DoHyun Pyun --- diff --git a/bt-service-adaptation/services/bt-service-common.c b/bt-service-adaptation/services/bt-service-common.c index 6baf5fa..2aa4800 100644 --- a/bt-service-adaptation/services/bt-service-common.c +++ b/bt-service-adaptation/services/bt-service-common.c @@ -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); diff --git a/packaging/bluetooth-frwk.spec b/packaging/bluetooth-frwk.spec index 68bde80..a18d3b2 100644 --- a/packaging/bluetooth-frwk.spec +++ b/packaging/bluetooth-frwk.spec @@ -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"