[Feature][ZXW-43][log] temp enable RLOG functions

Change-Id: I86983851f159413fab3a95140efe1cde84a242e1
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/libbinder/libbinder.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/libbinder/libbinder.bb
index 7f384a9..62078ae 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/libbinder/libbinder.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/libbinder/libbinder.bb
@@ -1,5 +1,5 @@
 DESCRIPTION = "libbinder"
-DEPENDS     = ""
+DEPENDS     = "libsclog"
 SECTION     = "lib"
 LICENSE     = "zte"
 PV          = "1.0.0"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/libsclog/libsclog.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/libsclog/libsclog.bb
index 1d04e98..bcb73f7 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/libsclog/libsclog.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/libsclog/libsclog.bb
@@ -1,4 +1,5 @@
 DESCRIPTION = "libsclog"

+DEPENDS     = "libnvram"

 SECTION     = "lib"

 LICENSE     = "zte"

 PV          = "1.0.0"

@@ -24,6 +25,7 @@
 do_install () {

 	install -d ${D}${libdir}/

 	install -d ${D}/usr/include

+	install -m 644 ${S}/libsclog/sc_log.h ${D}/usr/include

 	install -m 0755 ${S}/libsclog/libsclog.so  ${D}${libdir}/

 	install -m 0755 ${S}/libsclog/libsclog.a   ${D}${libdir}/

 	

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/Makefile b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/Makefile
index 3df98e3..09eb431 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/Makefile
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/Makefile
@@ -37,7 +37,8 @@
 LOCAL_CPPFLAGS += -fPIC -g -O2 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0 
 LOCAL_CPPFLAGS += -std=c++11
 
-LOCAL_LDLIBS  +=
+LOCAL_LDLIBS  += -lsclog
+LOCAL_LDLIBS  += -lnvram
 #LOCAL_LDFLAGS += -shared
 LDFLAGS += -shared
 
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c
index a52ff31..079cfab 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c
@@ -50,6 +50,8 @@
 #include "fake_log_device.h"
 #endif
 
+#include "sc_log.h"
+
 static int __write_to_log_init(log_id_t, struct iovec *vec, size_t nr);
 static int (*write_to_log)(log_id_t, struct iovec *vec, size_t nr) = __write_to_log_init;
 #ifdef HAVE_PTHREADS
@@ -147,6 +149,7 @@
     logd_fd = i;
 #endif
 #endif
+	sc_log_init("MAIN");
     return ret;
 }
 
@@ -294,7 +297,20 @@
 
     return ret;
 #else
-    printf("%s%s\n", (char*)(vec[1].iov_base), (char*)(vec[2].iov_base));
+    //printf("%s%s\n", (char*)(vec[1].iov_base), (char*)(vec[2].iov_base));
+	if ( *((int*)vec[0].iov_base) <= ANDROID_LOG_DEBUG)
+	{
+		sc_log_debug("[%s]:%s\n", (char*)(vec[1].iov_base), (char*)(vec[2].iov_base));
+	}
+	else if ( *((int*)vec[0].iov_base) == ANDROID_LOG_INFO)
+	{
+		sc_log_normal("[%s]:%s\n", (char*)(vec[1].iov_base), (char*)(vec[2].iov_base));
+	}
+	else
+	{
+		sc_log_error("[%s]:%s\n", (char*)(vec[1].iov_base), (char*)(vec[2].iov_base));
+	}
+
 #endif
 }