plugin: Replace shared/log.h with the libsyscommon/log.h 77/297377/1
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 17 Aug 2023 11:13:03 +0000 (20:13 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Thu, 17 Aug 2023 11:22:36 +0000 (20:22 +0900)
Change-Id: I382897148934deba330e23975b411d51103d3a61
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
36 files changed:
plugins/iot-headed/display/CMakeLists.txt
plugins/iot-headed/display/core.c
plugins/iot-headed/display/device-interface.c
plugins/iot-headed/display/key-filter.c
plugins/iot-headless/input/CMakeLists.txt
plugins/mobile/battery/CMakeLists.txt
plugins/mobile/battery/battery-notification.c
plugins/mobile/display/CMakeLists.txt
plugins/mobile/display/core.c
plugins/mobile/display/device-interface.c
plugins/mobile/display/key-filter.c
plugins/tv/display/CMakeLists.txt
plugins/tv/display/core.c
plugins/tv/display/device-interface.c
plugins/tv/display/key-filter.c
plugins/wearable/battery/CMakeLists.txt
plugins/wearable/battery/battery-notification.c
plugins/wearable/display/CMakeLists.txt
plugins/wearable/display/auto-brightness-sensorhub.c
plugins/wearable/display/auto-brightness.c
plugins/wearable/display/bezel.c
plugins/wearable/display/core.c
plugins/wearable/display/device-interface.c
plugins/wearable/display/display-handler.c
plugins/wearable/display/enhance.c
plugins/wearable/display/hbm.c
plugins/wearable/display/key-filter.c
plugins/wearable/display/lbm.c
plugins/wearable/display/powersaver.c
plugins/wearable/display/swim.c
src/core/log.h
src/power/power.h
src/shared/log.h
tests/auto-test/result.c
tests/auto-test/test.h
tools/devicectl/devicectl.c

index 532810d0aeed5f3f7eaf49fc6a1a0a5bac1d1c31..169618eeb0850d0dace9816ced01fc31d330f48f 100644 (file)
@@ -25,6 +25,8 @@ FOREACH(flag ${libpkgs_CFLAGS})
 ENDFOREACH(flag)
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LIB_CFLAGS}")
 
+ADD_DEFINITIONS("-DENABLE_DLOG")
+
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${libpkgs_LDFLAGS} deviced-common-private)
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "")
index b79a1714e17773fd910847d836cfb07113d68527..5ce8dff9f15d05249c323021ee63707738e4bf11 100644 (file)
@@ -43,7 +43,7 @@
 #include <device/display-internal.h>
 #include <hal/device/hal-device-power.h>
 
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 #include "core.h"
 #include "poll.h"
 #include "lock-detector.h"
index 64937978499ae4a9dd55a9e2409d9eb5d0d42a43..a0d73e1540111c66225416a631e9c94adeb80d0f 100644 (file)
@@ -33,7 +33,7 @@
 #include <hal/device/hal-display.h>
 
 #include "power/power-suspend.h"
-#include "core/log.h"
+#include <libsyscommon/log.h>
 #include "shared/devices.h"
 #include "shared/common.h"
 #include "device-interface.h"
index 345e355f99109d20d212bd6ed348f6653dc1bd75..988fa28c1d7227116529f11217a4bddba7ffbdc0 100644 (file)
@@ -46,7 +46,7 @@
 #include "shared/devices.h"
 #include "shared/common.h"
 #include "shared/apps.h"
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 #include "power/power-off.h"
 #include "power/power-suspend.h"
 #include "led/touch-key.h"
index 5de54d4b1ab972f99e937603efa1b19dcd809006..fe7460608163029a105c88edfc74e7fcd9527867 100644 (file)
@@ -11,6 +11,8 @@ PKG_CHECK_MODULES(REQUIRED_PKGS REQUIRED
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../power)
 
+ADD_DEFINITIONS("-DENABLE_DLOG")
+
 FILE(GLOB SRCS "*.c")
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "")
index b9c0f420dd74ab865c356398502e39687584b5ea..778ab93b06c654f56800938f270a408da9b945e4 100644 (file)
@@ -19,6 +19,8 @@ FOREACH(flag ${libpkgs_CFLAGS})
 ENDFOREACH(flag)
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LIB_CFLAGS}")
 
+ADD_DEFINITIONS("-DENABLE_DLOG")
+
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${libpkgs_LDFLAGS} deviced-common-private)
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "")
index ddf24621b84568574c4738fbb1d66e003e922e13..7698375949ca52de31073523b6ead1dd5ba29877 100644 (file)
@@ -24,7 +24,7 @@
 #include <system/syscommon-plugin-deviced-common-interface.h>
 #include <system/syscommon-plugin-deviced-display-interface.h>
 
-#include "core/log.h"
+#include <libsyscommon/log.h>
 #include "battery.h"
 #include "battery-parser.h"
 #include "power-supply.h"
index eed43f29591b09790c6ab28a1d930f1388f2e5bf..6b8a8e3e63ab616054b5d93ee7e6f5c94d1a60fd 100644 (file)
@@ -25,6 +25,8 @@ FOREACH(flag ${libpkgs_CFLAGS})
 ENDFOREACH(flag)
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LIB_CFLAGS}")
 
+ADD_DEFINITIONS("-DENABLE_DLOG")
+
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${libpkgs_LDFLAGS} deviced-common-private)
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "")
index c9d797e79e474658728100fb0080e034836150f1..ba2f79316f55bda22a67cd53da5ea763b30d0612 100644 (file)
@@ -42,7 +42,7 @@
 #include <libsyscommon/list.h>
 #include <hal/device/hal-device-power.h>
 
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 #include "ambient-mode.h"
 #include "core.h"
 #include "poll.h"
index 740b7f8ce13109a672f8a80b25832d41aecee4d6..3b3cd7a036839db0d3fc71b3edaf7264ac03b238 100644 (file)
@@ -33,7 +33,7 @@
 #include <hal/device/hal-display.h>
 
 #include "ambient-mode.h"
-#include "core/log.h"
+#include <libsyscommon/log.h>
 #include "shared/devices.h"
 #include "shared/common.h"
 #include "shared/device-notifier.h"
index 0a4d1df4c2a1ed21b80f95fece7828d3aa4ca0eb..32edcdff7b7bd900b25ab6f57eb5dd7598b60017 100644 (file)
@@ -48,7 +48,7 @@
 #include "shared/common.h"
 #include "shared/plugin.h"
 #include "shared/apps.h"
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 #include "power/power-off.h"
 #include "power/power-suspend.h"
 #include "led/touch-key.h"
index 3267977c71c1aa59ff2e3d73d74fcce692bd56ff..ae6e2d819bd38e5d167de75c704fc5d77a40b028 100644 (file)
@@ -25,6 +25,8 @@ FOREACH(flag ${libpkgs_CFLAGS})
 ENDFOREACH(flag)
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LIB_CFLAGS}")
 
+ADD_DEFINITIONS("-DENABLE_DLOG")
+
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${libpkgs_LDFLAGS} deviced-common-private)
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "")
index 082904f18f7ac74ad65d969bde82aa93b8ee4389..f679f926cb23331e9992707751f3eaf8f8dfcbf2 100644 (file)
@@ -40,9 +40,9 @@
 #include <vconf-keys.h>
 #include <sys/time.h>
 #include <libsyscommon/list.h>
+#include <libsyscommon/log.h>
 #include <hal/device/hal-device-power.h>
 
-#include "shared/log.h"
 #include "ambient-mode.h"
 #include "core.h"
 #include "poll.h"
index e6eedbb614eb9e30190ed0683a0e27a08ffc36ab..25cb33b768e7d4a9dd1f341d3d49e1cf4912fbdb 100644 (file)
@@ -33,7 +33,7 @@
 #include <hal/device/hal-display.h>
 
 #include "ambient-mode.h"
-#include "core/log.h"
+#include <libsyscommon/log.h>
 #include "shared/devices.h"
 #include "shared/common.h"
 #include "shared/device-notifier.h"
index becd49efeb0c1313d6526b6bcf885801b5dae254..73b42523a5411133585c269fe70d98c4102e579d 100644 (file)
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <libsyscommon/libgdbus.h>
 #include <libsyscommon/resource-manager.h>
+#include <libsyscommon/log.h>
 #include <system/syscommon-plugin-deviced-common-interface.h>
 #include <system/syscommon-plugin-deviced-display-interface.h>
 #include <linux/input.h>
index 9573fea409a8beac3b66cd6c7be0e6d80224613e..f3bd341281b026bf44abd697f72ba61bddf7340b 100644 (file)
@@ -21,6 +21,8 @@ FOREACH(flag ${libpkgs_CFLAGS})
 ENDFOREACH(flag)
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LIB_CFLAGS}")
 
+ADD_DEFINITIONS("-DENABLE_DLOG")
+
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${libpkgs_LDFLAGS} deviced-common-private)
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "")
index 4cc6ae8956faf17a6fe0273bf08bad47228019a9..336a305e04899e2f17d7112e858207e151e4e49e 100644 (file)
@@ -21,7 +21,7 @@
 #include <system/syscommon-plugin-deviced-common-interface.h>
 
 #include "core.h"
-#include "core/log.h"
+#include <libsyscommon/log.h>
 #include "shared/device-notifier.h"
 #include "power-supply.h"
 #include "battery-ops.h"
index 00e456b72440ca4784b8973c56f6c36b884682ac..97b5bc9a90d94c39032a24888ba20236629c1d2b 100644 (file)
@@ -25,6 +25,8 @@ FOREACH(flag ${libpkgs_CFLAGS})
 ENDFOREACH(flag)
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LIB_CFLAGS}")
 
+ADD_DEFINITIONS("-DENABLE_DLOG")
+
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${libpkgs_LDFLAGS} deviced-common-private batterymonitor)
 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "")
index 2e867c2acd33884215f0eb23ccead22d6839a704..6fc0d222b58d7732b9708c84f84674a56d4e5b67 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #include <vconf.h>
+#include <libsyscommon/log.h>
 
 #include "hbm.h"
 #include "lbm.h"
@@ -34,7 +35,7 @@
 #include "display-backlight.h"
 #include "display-config.h"
 #include "shared/device-notifier.h"
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 #include "battery/power-supply.h"
 #include "shared/plugin.h"
 
index 855212b576340ac9f9e92e6de80f61cbdad76fe7..b94529ec9ab814b79fc3de4c9637f6af350b6020 100644 (file)
@@ -37,7 +37,7 @@
 #include "display-config.h"
 #include "setting.h"
 #include "shared/device-notifier.h"
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 #include <libsyscommon/ini-parser.h>
 
 #define MAX_SAMPLING_COUNT     3
index b1a6ac4d44c8097906ff9e503cde24689fd22707..3f4abdbb34aac1275e92ddbdb167611fef0d36b5 100644 (file)
@@ -28,7 +28,7 @@
 #include "display-lock.h"
 #include "display-ops.h"
 #include "display-state-transition.h"
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 #include "shared/plugin.h"
 
 #ifndef VCONFKEY_SETAPPL_WAKEUP_BY_BEZEL_ENABLE
index 30d2d576d3ff3fcdba1c999589f585d216d3bd7e..c02f1f73299d369392cc3f1ba6c3d6ea9bc151a9 100644 (file)
@@ -43,7 +43,7 @@
 #include <libsyscommon/common.h>
 #include <hal/device/hal-device-power.h>
 
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 #include "auto-brightness-sensorhub.h"
 #include "ambient-mode.h"
 #include "core.h"
index f7e5cf9a5159b4ea212ce3beed7d43feef9b53f9..06709d06337ce080c2a24043f8a45f6afaccf640 100644 (file)
@@ -36,7 +36,7 @@
 #include <system/syscommon-plugin-deviced-common-interface.h>
 
 #include "ambient-mode.h"
-#include "core/log.h"
+#include <libsyscommon/log.h>
 #include "shared/devices.h"
 #include "shared/common.h"
 #include "shared/device-notifier.h"
index 4a5ddc5430d60d94b9dbd92963e3e2d3629bd685..c929cd6043d3d1489e4df91ad688df5af831ffeb 100644 (file)
@@ -29,7 +29,7 @@
 #include "poll.h"
 #include "shared/common.h"
 #include "shared/devices.h"
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 #include "display-actor.h"
 #include "display-info.h"
 #include "display-panel.h"
index 598c5a6814e2d1717cfdf5bc2b8f90335e820da4..bcbc55b5bed953c7c4832dd24d2587fe6a741e78 100644 (file)
@@ -28,7 +28,7 @@
 #include "display-ops.h"
 #include "display-panel.h"
 #include "shared/devices.h"
-#include "core/log.h"
+#include <libsyscommon/log.h>
 #include "shared/common.h"
 #include "shared/device-notifier.h"
 
index d62d74df2005aed49e6f98e394b44505613ed0e3..c10ce1fbfd1032ddd65faa7baea7245fe3aecb15 100644 (file)
@@ -28,7 +28,7 @@
 #include "display-panel.h"
 #include "shared/common.h"
 #include "shared/device-notifier.h"
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 
 #define BOARD_CONF_FILE "/etc/deviced/display.conf"
 
index d9dc9e876b494e076f4e59f0cc20d543eed489b9..f3f1d296ed2efa3f140cb1661a59b87de1013148 100644 (file)
@@ -25,6 +25,7 @@
 #include <vconf.h>
 #include <sys/types.h>
 #include <libsyscommon/libgdbus.h>
+#include <libsyscommon/log.h>
 #include <system/syscommon-plugin-deviced-common-interface.h>
 #include <linux/input.h>
 
index 8f2f4d942c73f1160a35fb9c62812d03f63bd2ae..329aa0a07cc8a06b62acbaa90e4a16330843ee17 100644 (file)
@@ -30,7 +30,7 @@
 #include "display-ops.h"
 #include "shared/common.h"
 #include "shared/device-notifier.h"
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 
 #define SIGNAL_LBM_ON  "LBMOn"
 #define SIGNAL_LBM_OFF "LBMOff"
index 95cdcb1ca725b0ee31dd8e474f8370c1d7eb5911..07450abe4c3bbf16ba9330d20f247fa20a4f0c2b 100644 (file)
@@ -22,7 +22,7 @@
 #include "shared/common.h"
 #include "shared/devices.h"
 #include "shared/device-notifier.h"
-#include "core/log.h"
+#include <libsyscommon/log.h>
 #include "core.h"
 #include "device-interface.h"
 #include "display-backlight.h"
index 9f1962e9a838524ddb45dce9b9d2e1b29c7547b1..06897e2c366c82cd6e49ce19767d83b0357e7626 100644 (file)
@@ -26,7 +26,7 @@
 #include "display-panel.h"
 #include "display-state-transition.h"
 #include "shared/plugin.h"
-#include "shared/log.h"
+#include <libsyscommon/log.h>
 
 #include <libsyscommon/libgdbus.h>
 #include <system/syscommon-plugin-deviced-common-interface.h>
index 395ab0e5b9b53c6ebdb921ad943d314b96c6c7e8..8d5ffbbbd3de3418276c20a1826f2a3699f4244d 100644 (file)
 #define __LOG_H__
 
 #ifdef ENABLE_DEVICED_DLOG
+#ifndef ENABLE_DLOG
 #define ENABLE_DLOG
 #endif
+#endif
 
 #ifdef LOG_TAG
 #undef LOG_TAG
index 1c11d8b92e0c8bdceffeee6c2fe14c67aa978dca..b174d5aede82094f1bc63e54d2d9267c7b031a5c 100644 (file)
@@ -26,7 +26,6 @@
 #include <libsyscommon/ini-parser.h>
 #include <system/syscommon-plugin-deviced-power-interface.h>
 
-#include "shared/log-macro.h"
 #include "shared/device-notifier.h"
 
 struct trans_info {
@@ -55,8 +54,6 @@ static inline uint64_t convert_action_string_to_power_state(const char *str)
        else if (MATCH(str, "current"))
                return DEVICED_POWER_STATE_ALL;
 
-       _W("Invalid power state=%s", str);
-
        return DEVICED_POWER_STATE_UNDEFINED;
 }
 
index 5a16f285e5243e757e0673553bb0554b3a6e6e61..48b31e39d735b4cc65c2c293a12ab379181db508 100644 (file)
 #define __LOG_H__
 
 #ifdef ENABLE_LIBDEVICED_DLOG
+#ifndef ENABLE_DLOG
 #define ENABLE_DLOG
 #endif
+#endif
 
 #if defined(ENABLE_TEST) && defined(ENABLE_DLOG)
 #undef ENABLE_DLOG
index 18b82df511125a35eef42c05294d50ca23919767..0e7f2484969e875569afa3f0e7d229da4dace5cc 100644 (file)
 #include "shared/common.h"
 
 #ifdef ENABLE_TEST_DLOG
+#ifndef ENABLE_DLOG
 #define ENABLE_DLOG
 #endif
+#endif
 
 #define LOG_TAG "ATR" /* AUTO_TESTE_RESULT */
 #include "shared/log-macro.h"
index ef10f18be4da4da0b46427dd24702ea9b3877573..2a05e026938d15aa3b56ec93de53457189f0da2d 100644 (file)
 #include "core/udev.h"
 
 #ifdef ENABLE_TEST_DLOG
+#ifndef ENABLE_DLOG
 #define ENABLE_DLOG
 #endif
+#endif
 
 #define LOG_TAG "AUTO_TEST"
 #include "shared/log-macro.h"
index be8f0638eb2afdf7cef445b47a7ab4260fc257c5..30cccded7184e176773d05f3155696b026a32fba 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <libsyscommon/libgdbus.h>
+#include <libsyscommon/log.h>
 #include <shared/common.h>
 #include "usb.h"
 #include "power/power.h"