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 532810d..169618e 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 b79a171..5ce8dff 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 6493797..a0d73e1 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 345e355..988fa28 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 5de54d4..fe74606 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 b9c0f42..778ab93 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 ddf2462..7698375 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 eed43f2..6b8a8e3 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 c9d797e..ba2f793 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 740b7f8..3b3cd7a 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 0a4d1df..32edcdf 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 3267977..ae6e2d8 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 082904f..f679f92 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 e6eedbb..25cb33b 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 becd49e..73b4252 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 9573fea..f3bd341 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 4cc6ae8..336a305 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 00e456b..97b5bc9 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 2e867c2..6fc0d22 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 855212b..b94529e 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 b1a6ac4..3f4abdb 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 30d2d57..c02f1f7 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 f7e5cf9..06709d0 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 4a5ddc5..c929cd6 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 598c5a6..bcbc55b 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 d62d74d..c10ce1f 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 d9dc9e8..f3f1d29 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 8f2f4d9..329aa0a 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 95cdcb1..07450ab 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 9f1962e..06897e2 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 395ab0e..8d5ffbb 100644 (file)
 #define __LOG_H__
 
 #ifdef ENABLE_DEVICED_DLOG
+#ifndef ENABLE_DLOG
 #define ENABLE_DLOG
 #endif
+#endif
 
 #ifdef LOG_TAG
 #undef LOG_TAG
index 1c11d8b..b174d5a 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 5a16f28..48b31e3 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 18b82df..0e7f248 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 ef10f18..2a05e02 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 be8f063..30cccde 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"