From 7dd9fb2413c8c50088d77005a58d04c969b1915f Mon Sep 17 00:00:00 2001 From: Jiwoong Im Date: Tue, 18 Oct 2016 15:40:18 +0900 Subject: [PATCH] modify log level in buxton/vconf api Change-Id: I53297c268240a0ff5731e832256843260521c6e8 Signed-off-by: Jiwoong Im --- lib/buxton2.c | 2 +- packaging/buxton2.spec | 1 + vconf-compat/CMakeLists.txt | 4 ++-- vconf-compat/vconf.c | 7 ++++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/buxton2.c b/lib/buxton2.c index 84d0db1..1638018 100644 --- a/lib/buxton2.c +++ b/lib/buxton2.c @@ -2294,7 +2294,7 @@ int connect_server(const char *addr) if (errno == ENOENT) bxt_dbg("connect: '%s' not exist", addr); else - bxt_err("connect: connect errno %d", errno); + bxt_dbg("connect: connect errno %d", errno); close(fd); return -1; } diff --git a/packaging/buxton2.spec b/packaging/buxton2.spec index d22e74f..39c6a94 100644 --- a/packaging/buxton2.spec +++ b/packaging/buxton2.spec @@ -20,6 +20,7 @@ BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(cynara-client-async) +BuildRequires: pkgconfig(dlog) Requires(post): /usr/bin/getent Requires(post): /usr/bin/chown Requires(post): /usr/sbin/useradd diff --git a/vconf-compat/CMakeLists.txt b/vconf-compat/CMakeLists.txt index 06ca125..70288c5 100644 --- a/vconf-compat/CMakeLists.txt +++ b/vconf-compat/CMakeLists.txt @@ -1,6 +1,6 @@ # libvconf build -PKG_CHECK_MODULES(V_PKGS REQUIRED vconf-internal-keys) +PKG_CHECK_MODULES(V_PKGS REQUIRED vconf-internal-keys dlog) FOREACH(flag ${V_PKGS_CFLAGS}) SET(VCONF_CFLAGS "${VCONF_CFLAGS} ${flag}") @@ -17,7 +17,7 @@ SET_TARGET_PROPERTIES(vconf PROPERTIES VERSION 0.3.1 SOVERSION 0 ) -TARGET_LINK_LIBRARIES(vconf buxton2) +TARGET_LINK_LIBRARIES(vconf buxton2 dlog) INSTALL(TARGETS vconf DESTINATION ${LIB_INSTALL_DIR}) CONFIGURE_FILE(vconf.pc.in vconf.pc @ONLY) diff --git a/vconf-compat/vconf.c b/vconf-compat/vconf.c index 26592a2..27ce2c2 100644 --- a/vconf-compat/vconf.c +++ b/vconf-compat/vconf.c @@ -27,6 +27,7 @@ #include #include +#include #include "vconf.h" @@ -34,7 +35,11 @@ # define EXPORT __attribute__((visibility("default"))) #endif -#define LOGE(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__) +#ifdef LOG_TAG +#undef LOG_TAG +#endif + +#define LOG_TAG "VCONF" static pthread_mutex_t vconf_lock = PTHREAD_MUTEX_INITIALIZER; static int _refcnt; -- 2.7.4